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