Tatham Oddie

Enter the Tatrix

Which time zone should I set for my server?

with 2 comments

This was the question I was faced with last week. I was configuring a VPC image in Sydney, that I was later going to load on to a physical box in San Diego, then use it from anywhere in the world. So which time zone to use?

I decided upon UTC, and now, the more that I think about it, I don’t know why all servers aren’t configured that way.

Advantages to using UTC:

  • No weird shifts/jumps around daylight savings
  • Accidental usage of DateTime.Now in server-side code returns that same value as DateTime.UtcNow anyway
  • Migrating applications and their data, or entire VMs across physical locations becomes easy

Disadvantages to using UTC:

  • Everything is stored in UTC, and thus hard for most humans to deal with mentally. The solution: tools like the Windows Event Viewer and SQL Management Studio should allow you to apply a time zone offset to visible results.

My recommendation: Run all your servers in UTC (that’s “GMT – Greenwich Mean Time” with “Automatically adjust clock for DST” turned OFF).

Maybe Adam can add this to his standards? ;)

Written by Tatham Oddie

July 30, 2007 at 21:21

2 Responses

Subscribe to comments with RSS.

  1. [...] Which time zone do I set for my server?Tatham had a good idea – set up all of your servers in UTC time. I can’t think of a reason not to. [...]

  2. The other advantage I feel is, in the UI we can show UTC Date/Time recorded on the server in the user’s regional time zone

    format in a manner that it actually relates to him. I have also put up a code sample on this here – http://mvark.blogspot.com/2007/09/how-to-show-utc-datetime-recorded-on.html

    ‘Anil’ Radhakrishna

    mvark

    December 27, 2007 at 18:18


Leave a Reply