Determining remote daylight saving in sql server

后端 未结 4 1207
刺人心
刺人心 2020-12-21 01:07

I want to determine the if daylight saving time is active or not, but in a region different to where my server is located.

My problem is I want to check the dayligh

4条回答
  •  旧巷少年郎
    2020-12-21 01:34

    On Sql Server 2016:

    With sys.time_zone_info now you can query if a specific timezone is currently on DST.

    select * from sys.time_zone_info
    

    Here you have an example result

    name                    current_utc_offset    is_currently_dst
    Aleutian Standard Time  -09:00                1
    Hawaiian Standard Time  -10:00                0
    Marquesas Standard Time -09:30                0
    Alaskan Standard Time   -08:00                1
    

提交回复
热议问题