Sql-server – WorldWide site – should I save UTC or in fixed time

sql serverutc-time

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 ?

Best Answer

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.