We use date_default_timezone_set('GMT');
and, subsequently, all timestamps are stored in our database in GMT format.
Each individual community member specifies their GMT offset from a dropdown menu in their profile.
Then, when we display the timestamps, we add the GMT offset to the timestamp while pretty printing it.
The problem is that daylight savings time isn't being taken into effect. For example, even though I live in the EST time zone (GMT -5), I have to manually change my profile to be GMT -4 for half the year.
I am assuming that I can fetch date('I')
to determine whether daylight savings time is currently in effect, and, if it is, add an hour to the offset in member profiles. The problem is that daylight savings seems to be country-specific. Would I be save to do this for members in the US, UK and Canada and then let the stragglers fend for themselves?