Re:Ask HN: DBMS 'Timestamp' or Unix Epoch as an Integer?
by gregjor on Saturday May 12, 2012 @03:42AM
(#3963143)
When you have multiple applications or instances writing to the database you will want all date/time references in the database to come from a aingle source -- the database server's clock. Otherwise you will be plagued by time zone and clock drift problems.
Another reason to use a TIMESTAMP or DATETIME type is you can use date/time operators and functions on it easier. For example timestamp_column + INTERVAL 30 DAY (in MySQL) is clearer than having to convert an INT.
Every relational database has more than one date/time type in case you only need dates without times, for example.
Another reason to use a TIMESTAMP or DATETIME type is you can use date/time operators and functions on it easier. For example timestamp_column + INTERVAL 30 DAY (in MySQL) is clearer than having to convert an INT.
Every relational database has more than one date/time type in case you only need dates without times, for example.