July 18, 2011 at 7:08 am
I'm in the middle of playing with converting someones work for calculating the surise/suset of a given lattitude and longitude via TSQL;
i notice in the comments of the code, someone claims that
select getutcdate() - getdate() --for me, it's 1900-01-01 04:00:00.000 (four hours)
can return the wrong difference in SQL 2005.
my Google-Fu is strong, and i cannot find anything related to erroneous results.
Ever hear of SQL 2005 giving incorrect results as a result of Daylight Savings Time? I installed 2005 Developer RTM to test, but a limited,test of today doesn't really fully test anything.
Lowell
July 18, 2011 at 12:38 pm
I think SQL just works with the system date of the computer, and the time zone and DST settings, so I would think any error would be from incorrect settings on the computer, not SQL's fault.
July 18, 2011 at 12:41 pm
that's what i thought too, homebrew; i could see that if you didn't apply the DST patch in 2007 on your Windows operating System, where they moved the default DST times, might be off for a week or two, but the code comment inferred an actual calculation error...didn't make sense from something so basic.
Thanks for confirming what I had suspected; nice to hear the same thoughts from a peer.
Lowell
July 18, 2011 at 12:43 pm
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply