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.
精彩评论