SQL Server AutoDate
I have my server in US and my client is in India, the problem is when he is inserting data there is a autoDate inside MSSql Table, but as the server is in different time zone, We are getting date with 12Hours different, how to overcome it.
Date in Table is AutoDate GetDa开发者_如何学Pythonte()
Regards
Use of UTC format may solve your issue. Please refer to these links
- Convert UTC/GMT time to local time
- How to handle conversion of a DateTime independently of the timezone of the hosting server?
How about changing your default constraint and rely on GETUTCDATE()
instead of GETDATE()
? This would solve your issue from the storage perspective.
You'd have to slightly alter your html rendering as well, in order to generate the date in a user friendly format, taking into account the user's timezone.
精彩评论