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