string encode_date(int t)
Converts a system time value to an appropriately formatted date-only spec for the database.
Time to encode.