
Originally Posted by
r937
the issue with the daylight savings time, as well as with timezone offset, is easily resolved by simply storing datetimes in GMT
hmmm. You mean like this?
Code:
SELECT CONVERT_TZ(NOW(),@@global.time_zone,'GMT');
Sure, I guess that would work. (not sure if I've used the correct system variable, though).

Originally Posted by
r937
how does storing unix epoch seconds as integers solve those problems?
Sure, you've still got to convert, but at least it's possible to retrieve from epoch seconds, the correct datetime, taking into account daylight saving. In my above example 2011-10-30 01:30 could actually be one of two times (as in the UK the clocks will have gone back an hour at 2am), but 1319938200 is unambiguous.
However, storing everything as GMT would, indeed, solve the problem, albeit it might require a slight change of mindset!
Cheers
Bookmarks