开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜