SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 How to check DST for AUS time zone
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

somannameti
Starting Member

2 Posts

Posted - 04/23/2012 :  02:58:24  Show Profile  Reply with Quote

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

India
47023 Posts

Posted - 04/23/2012 :  11:51:26  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000