May 22, 2010 at 9:16 am
My database is on a hosted server in a different time zone. All of my GETDATE() updates are an hour off. How can I adjust my database to reflect my time zone?
May 22, 2010 at 9:27 am
You might consider using GETUTCDATE() instead.
But you need to take care of the different time zone you're in.
May 22, 2010 at 11:08 am
Thanks for the reply. I figured out what I need to do. Too simple but I was just using the wrong date function.
Since the Server time is one hour behind the local time I just need to change to DATEADD
LocalTime = DATEADD(Hour,+1,GETDATE())
Since the server location moves to Standard time and Daylight Savings time the same as we do locally this is simple. I would have to do quite a bit more if they did not sync this way.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply