none
SQL Server 2008: Default time zone

    Question

  • Dear all

    I have a very basic question about setting up default time zone for SQL server. Can we set the default time zone for SQL server or the time zone of machine on which it is installed is considered as the default time zone?

    Here is my actual problem: We set up SQL server 2008 on Win Server 2003 machine. After working for a week we realized that the getdate() gives incorrect time. Now we updated the time settings on Win Server 2003 and it gets reflected on database server. But is this the way it works? Do we need to consider any other points/settings?
    Any useful pointers will be helpful..

    Thanks
    Sunday, July 12, 2009 6:11 PM

Answers

  • The GETDATE() function returns the date and time from the operating system:
    "Returns the current database system timestamp as a datetime value without the database time zone offset. This value is derived from the operating system of the computer on which the instance of SQL Server is running."  The link documenting this behavior is here:
    http://msdn.microsoft.com/en-us/library/ms188383.aspx

    Hope this helps
    David Dye
    Sunday, July 12, 2009 8:51 PM

All replies