Let's say I have a world wide website ( I mean it has uses from all around the world).

I have 1 server which is in germany ( at some city). it will never be moved from germany - ever.

My question is :

When users saves data , I need to save the action date :

Should I save ( and I think I do) it as UTC ?

Or since - the server is in one location - it is ok to save all the dates as GetDATE() so the point of relativity is the same point.

Am I wrong ? If I do , can you please supply a simple scenario where it's gonna fail ?


Always store data in the database in UTC and then use the appropriate timezone to convert it during display, in the application. Is the only sensible approach when it comes to consider data mobility (geo-replication), user location and , most importantly, daylight savings. If you store local time there will be times when you cannot distinguish between column values and you cannot order them properly due to daylight savings. Think that, in Germany, Oct. 27th 2:05 am will happen twice this year... And that is an easy case compared to, say, Morocco.

  • Thank you Remus.So the only problem is with daylight saving where a time could happend twice ( ? becuase of changing the clock to one hour prior ? ) – Royi Namir May 7 '13 at 10:47
  • 2
    Nope, look at Samoa they completely moved their timezone forward. – billinkc May 7 '13 at 15:16
  • @billinkc I read it. but can you explain the actual problem here ? does the actual problem is that a time can occur twice ? please elaborate. – Royi Namir May 8 '13 at 6:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.