Tag Info

New answers tagged

1

If you are using SQL Server 2008 or higher, I recommend the DATETIMEOFFSET data type. It stores exactly what you want: date + time + time zone offset. This means that you don't have to write code to translate the value to/from UTC. It also means that no one can forget to translate the value to/from UTC and corrupt the data. PS: This data type translates ...


2

As a person who has had to fix timezone issues, ALWAYS store the data in UTC. Translate it to the timezone they selected for display only. If SQL Server allows you to store the UTC offset as part of the datetime, then it's not as big of a deal. However, in MySQL, the date is just stored absent of timezone context. Here's a case in point, which I hope I can ...



Top 50 recent answers are included