p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   SQL Server 2000 (http://p2p.wrox.com/forumdisplay.php?f=20)
-   -   SQL Database storing entries in GMT Time (http://p2p.wrox.com/showthread.php?t=43605)

rijahs June 7th, 2006 01:58 AM

SQL Database storing entries in GMT Time

I am storing the events from a couple of servers in the SQL Database and the SQL Database stores the data in the GMT Time. I have checked the servers and all the servers are in the local time(+5:30). When I use the SQL Query to check the time, the entries are being stored in the GMT Time rather than the local time which is creating a lot of problems for me. For some strange reasons, some of the entries show the right local time as well. Kindly advice how to resolve this problem.

Thanks a lot in advance.

som_dutt June 7th, 2006 01:50 PM

Hi !
Tell us which sql function you use -
(1) getutcdate() or
(2) getdate()

If you are using getutcdate() then, that's not the problem. This is meant to return 'Universal Time Coordinate or GMT'.
But, getdate() definitely returns local date time. If it is not so, tell us about the query you use.

- Som Dutt

All times are GMT -4. The time now is 11:09 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.