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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

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

 All Forums
 Site Related Forums
 Article Discussion
 Article: Getting the time zone
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ask SQLTeam Question

0 Posts

Posted - 07/16/2000 :  12:48:18  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
Kristof writes "GETDATE() returns the current local date/time. There doesn't seem to be any function to get this in GMT time, or even find out what time zone the SQL server is running in. Assuming the client connects to the server with ODBC and doesn't know what timezone the server is running in, how can it find out? I know the client could subtract the clients time from the servers GETDATE(), but that would only work if the two machine's clocks are synchronized"

Article Link.

Starting Member

0 Posts

Posted - 09/14/2000 :  09:41:07  Show Profile  Reply with Quote
There is one more way to do what the person asked!

Hey, Guru, check this out

declare @deltaGMT int

exec master.dbo.xp_regread 'HKEY_LOCAL_MACHINE',
'ActiveTimeBias', @DeltaGMT OUT

select getdate() as LocalTime, dateadd(minute, @deltaGMT, getdate() ) as GMT


Go to Top of Page
  Previous Topic Topic Next 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.04 seconds. Powered By: Snitz Forums 2000