I have written several Stored Procedures that insert new records into various parts of the database of a separate commercial application. This app has been work fine for about 4 months, but started giving strange results 2 weeks ago.
The application stores dates/times on the records as stamps of the number of seconds since 01-01-1970 00:00:00 (Behold those UNIX programmers , so 2002-04-13 10:15:01 is stored as 1018692901. These records are then escalated by other processes (part of the commercial app) after set periods of time.
It has now come to light that these date/time stamps go from 01-01-1970 00:00:00, but ignores the Daylight Saving setting on the local machine.
My SQL Stored procedures just encode the current GetDate() which is adjusted for DS.
Does anyone know of a way that I can in my Stored Procedures :
1. Return the current date, but ignoring the DS setting
2. Detect whether DS is currently active - if so, I can encode the 1 hour difference manually.
Thanks in advance for any help.
Chris.
Chris Lawton
Chris@Lawton.net
The application stores dates/times on the records as stamps of the number of seconds since 01-01-1970 00:00:00 (Behold those UNIX programmers , so 2002-04-13 10:15:01 is stored as 1018692901. These records are then escalated by other processes (part of the commercial app) after set periods of time.
It has now come to light that these date/time stamps go from 01-01-1970 00:00:00, but ignores the Daylight Saving setting on the local machine.
My SQL Stored procedures just encode the current GetDate() which is adjusted for DS.
Does anyone know of a way that I can in my Stored Procedures :
1. Return the current date, but ignoring the DS setting
2. Detect whether DS is currently active - if so, I can encode the 1 hour difference manually.
Thanks in advance for any help.
Chris.
Chris Lawton
Chris@Lawton.net