I’m from the UK, and have recently deployed a website on WinHost’s Basic Package.
When using DateTime.Now() in C#, or GETDATE() in SQL, these are both returning something like GMT-8 (because the server is hosted in the US).
I think I’m a bit limited in terms of permissions on the server (for example I can’t change my SQL Login Language).
What is the best method of storing these dates in GMT?
Description
I think you should store your DateTimes in UTC. Then you can simple convert it to another Timezone with the TimezoneInfo class.
DateTime.UtcNowto your database or usegetUtcDateinside sqlTimeZoneInfo.ConvertTimeFromUtcSample
More Information