1

Does it matter what time zone the server is running?

Let's say the only time I am using time is to timestamp when the object is created in database. The felt that it doesn't matter as long as the timestamp is in UTC?

The server could be running in other time zone but as long as I save in UTC, it shouldn't matter right?

What would be the example where time zone matters in sever?

Zanko
  • 4,298
  • 4
  • 31
  • 54
  • This is in the best practices wiki, both in the summary, and in [this specific answer](http://stackoverflow.com/questions/2532729/daylight-saving-time-and-time-zone-best-practices/30897258#30897258). – Matt Johnson-Pint Feb 22 '16 at 06:37

1 Answers1

3

If you set the time zone in the application, like using UTC when creating timestamps the time zone doesn't matter. If you use localtime functions without setting the time zone the server time zone matters.

bolav
  • 6,938
  • 2
  • 18
  • 42
  • I agree. To add to this: In most standard client - server architectures it's a valid decision to let the client side deal with converting server times to their respective local times: http://currentmillis.com/tutorials/system-currentTimeMillis.html#architecture - That being said there needs to be a clear convention between server side & client side so that the client always knows the 'fully qualified' time (including timezone if your time-keeping is timezone based). Otherwise: what would happen if you change your server's timezone? Your architecture needs to be able to handle such an event – Sandman Feb 21 '16 at 07:58