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 2005 Forums
 Transact-SQL (2005)
 time stamp is 5 hours ahead

Author  Topic 

akpaga
Constraint Violating Yak Guru

331 Posts

Posted - 2009-09-15 : 11:42:27
Hi

i am logging an entry to database but the timestamp is showing 5 hrs ahead than my system time. What could be the reason. Is the sql server set up at greenwhich time ? is there a way to change it to my time zone.

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2009-09-15 : 11:47:12
Are you connecting directly to the database to "log" the entry using an UPDATE statement in a query window of Management Studio or are you doing it through some application? And when it is "showing up" as a different time are you directly querying the database using a query window in Management Studio or are you seeing it via an application search or report? Is the database server in the same timezone as you?

Be One with the Optimizer
TG
Go to Top of Page

akpaga
Constraint Violating Yak Guru

331 Posts

Posted - 2009-09-15 : 11:50:08
we are logging entries in the database through an apllication software.
yes the database server is in the same time zone ...infact on the same machine..
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2009-09-15 : 12:57:05
Sounds like you'll have to talk with your application guys to see what that code is doing. But if you have permission to run Profiler on the server than you can capture the insert when you log the entry. If the date value is already offset then you know it is happening in the application code prior to it reaching the database. You can also use a query the date values directly out of the table. If it is not offset there then it is likely the reporting code that is applying the offset when you "look" at the value. At any rate is there an application help desk or someone you can ask because it sounds like it is something intentionally built into your system.

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -