As clearly indicated by Should I use field 'datetime' or 'timestamp'?, the major differences between a DATETIME and TIMESTAMP field are:
- TIMESTAMP in MySQL are generally used to track changes to records, and automatically updated every time the record is changed.
- DATETIME represents a date (as found in a calendar) and a time (as can be observed on a wall clock), while TIMESTAMP represents a well defined point in time.
- Only TIMESTAMP values are converted from the current time zone to UTC for storage, and converted back from UTC to the current time zone for retrieval.
So, I have a table which contains both a date_created column and a date_modified column. I made date_created as DATETIME so it doesn't get overridden every time the record is updated, and made date_modified as TIMESTAMP so it updates every time the record is updated.
How do I keep the two synchronized? For instance, after initially creating a record, the date_created and date_modified columns, they will be the same. Later if the record was never changed, they should remain the same regardless of timezones and daylight saving time, no?