Spend literally two days trying to figure out why I have a 2 hour offset in my timezones for a lamp web app. This isn't even close to my first timezone rodeo.

Check logs, reset Apache/MySQL/PHP timezones in like 100 places. Use 3rd party server side and client side timezone libraries. Moment.js you say? Shit works like a charm... but is, of course, still two hours off.

MySQL is right. PHP is right. Apache is right. PHP libs are in place. Finally convert the entire damn project to use epoch time because I have a deadline, I have no more time to read backwater AWS docs and try to figure out why the hell this Ubuntu EC2 is fucked up, and I literally cannot figure out why in the hell the damn clock is off.

Several days later notice a variable in the main .config file... right in root... 2 hour timezone offset.


  • 8
    Date / time and time zones can be absolute hell.

    Everyone should have switched to Swatch Internet Time.
  • 1
    @N00bPancakes but shouldn't you still say how many beats have elapsed in a given solar day relative to the time zone of the users?
  • 1
    @N00bPancakes ok, BMT is always with respect to UTC+1
  • 4
    UTC only.

    Only UTC.

    Just UTC.

    Nothing else but UTC.

  • 0
    @N00bPancakes @IntrusionCM doesn’t fix my problems with local time vs ship time
  • 0
    @jeeper yes, it does.

    Time zone shifting solely belongs in one place. Dependent on what you do - first guess would be presentation layer.

    Everything else must be UTC.

    Must. Because all the hassle with time zones, day light saving time etc is now in one place instead of being spread all over.
  • 0
    @IntrusionCM ok sure but when the ship does not have a way to synchronize with the UTC ship time and local time can get out of sync significantly.
  • 0
    @jeeper Ship can deliver what ever time it wants...you can store a timezone additionally. Will still be UTC and when read, converted back to input time zone.

    The second part... I don't know what you mean? NTP exists since ... 40 years I think? To synchronize time
Add Comment