Comment 1 for bug 1394359

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Converting a Unix timestamp to a datetime and back again is what we do every time we store a date in the database. ;)

There are functions for the conversion in dml.php:

1. db_format_timestamp($timestamp): Converts from a Unix timestamp into the datetime format suitable to insert into the DB.

2. db_format_tsfield($field): Generates the SQL to convert the database field from a datetime into a Unix timestamp.