开发者

How to get exact OmanTime?

开发者 https://www.devze.com 2023-01-03 18:29 出处:网络
how to get the exact OmanTime using an sql function? This is my code : RETURN DATEADD(mi,-90,@CurrentDate)

how to get the exact OmanTime using an sql function?

This is my code : RETURN DATEADD(mi,-90,@CurrentDate)

bu开发者_Python百科t it is not correct.


Muscat, Oman in is the +4 timezone, so local time there is 4 hours later than UTC - thus, when it's noon on the zero meridian it's 4:00 PM in Muscat. Thus, you'd need to do something like

RETURN DATEADD(Hour, 4, GETUTCDATE())

Share and enjoy.

0

精彩评论

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