Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 How to check DST for AUS time zone

Author  Topic 

somannameti
Starting Member

2 Posts

Posted - 2012-04-23 : 02:58:24

Hi ALL,

The server is in USA , i am setting Aus time zone so when

by the below query
EXEC master..xp_instance_regenumvalues
@rootkey = N'HKEY_LOCAL_MACHINE',
@key = N'SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones\\Aus Eastern Standard Time'

i get the Aus time zone settings
value data
display (GMT+10:00) sydney
Dlt Aus Eastern Daylight time
Std Aus Eastern Standard time
MapID 20,21
index 255

From the above data how can i get day light timing is -1/+1 hour or the Aus timing to current system timing or i need to set any other data ?

is the US day light timing effect the Aus time zone settings ?

please provide me the solution




visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-04-23 : 11:51:26
you cant use standard datetime funtions to get day light saving information. you've datetimeoffset function to get offset of local time from GMT but its also not daylight saving aware
for getting daylight saving you're write a UDF.

see

http://www.mssqltips.com/sqlservertip/1372/daylight-savings-time-functions-in-sql-server/

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -