Re: getutcdate() issues
- From: "Aaron Bertrand [SQL Server MVP]" <ten.xoc@xxxxxxxxxxxxxx>
- Date: Tue, 28 Jul 2009 18:31:08 -0400
The point I'm making is that the function is named "getutcdate" but is not
guaranteed to return current UTC datetime.
Ok, and GETDATE() and CURRENT_TIMESTAMP are supposed are supposed to return
the current local time. If your server has incorrect local time, guess
what? Those will be wrong too. As will the times recorded in the event
log, SQL Server's error log, Agent jobs will be starting at the wrong time,
Windows scheduled tasks will not run when they are expected, and the list
goes on and on... Why the discussion is isolated to GETUTCDATE() I have no
idea. The same problem exists if you are using ASP.NET, or JavaScript, or
WSH, or Perl, or PHP, etc. etc. -- they all use the system clock, and
believe that it is accurate.
Also : I don't think that relying on Windows auto-updates ( which many find
annoying and ignore or turn off ) for updating Windows timezones definitions
( including DST start/end ) is a serious enterprise database solution.
I still fail to understand why this is the database engine's fault. If your
server has the incorrect time there is plenty going wrong whether or not you
have a database engine installed. Just because Windows updates might be
annoying does not give an inattentive administrator an excuse.
Does anyone know how other databases/platforms handle this issue ?
Since most do not *require* an Internet connection at all, I have to believe
that they work the same way: they trust the host operating system to provide
them with the correct system clock. I'm sorry John, but I'm afraid you're
pointing fingers in the wrong direction, and if you're expecting Microsoft
to "fix" SQL Server so that it will disobey the local system clock, I don't
think you're going to get very far. But hey, if you think you can make a
coherent enough case for it, you are of course more than welcome to file a
suggestion at connect.microsoft.com/sql ...
.
- Follow-Ups:
- Re: getutcdate() issues
- From: John A Grandy
- Re: getutcdate() issues
- References:
- getutcdate() issues
- From: John A Grandy
- Re: getutcdate() issues
- From: Aaron Bertrand [SQL Server MVP]
- Re: getutcdate() issues
- From: John A Grandy
- Re: getutcdate() issues
- From: Aaron Bertrand [SQL Server MVP]
- Re: getutcdate() issues
- From: John A Grandy
- getutcdate() issues
- Prev by Date: multiple bst timezone codes
- Next by Date: Re: WITH Statement
- Previous by thread: Re: getutcdate() issues
- Next by thread: Re: getutcdate() issues
- Index(es):
Relevant Pages
|
Loading