alukindo Posted April 15, 2007 Report Share Posted April 15, 2007 Hello: I am parsing a date string such as: 01-APR-07 10:20:12.67 and converting this into LabVIEW seconds (since 1904). Problem is that the resulting displayed date is 1 hour ahead of what I want it to be. See code snippet. I realize that this is because of 'Day Light Savings' time-correction. Is there a way to make LabVIEW ignore Day Light Savings time-correction? . . . I know I can do the correction by some logic but I just want to disable the day light saving correction ---period! Anthony L. Quote Link to comment
Rolf Kalbermatter Posted April 15, 2007 Report Share Posted April 15, 2007 QUOTE(alukindo @ Apr 13 2007, 11:28 PM) Hello:I am parsing a date string such as: 01-APR-07 10:20:12.67 and converting this into LabVIEW seconds (since 1904). Problem is that the resulting displayed date is 1 hour ahead of what I want it to be. See code snippet. I realize that this is because of 'Day Light Savings' time-correction. Is there a way to make LabVIEW ignore Day Light Savings time-correction? . . . I know I can do the correction by some logic but I just want to disable the day light saving correction ---period! Anthony L. You can disable DST in your OS. Other than that LabVIEW won't do anything different than what it does now since it uses OS functions to deal with date/time. Before LabVIEW 7.0 it always used the current DST status to convert date/time. From LabVIEW 7.0 on it uses the actual DST status that belongs to the actual timestamp for all timestamp on and after Jan. 1, 1970. There is however one limit to this that was uncovered with the recent DST change in the US. Windows only can have one DST period per timezone and that applies to all years. So there will be a two week period when DST calculation is off now for all years before this one in the US. Microsoft stated that they fix that in VISTA but have no intention to fix that for earlier Windows versions. In LabVIEW 8 and above some of the Date/Time functions have an extra boolean input that allows you to treat the data/time in UTC. Rolf Kalbermatter Quote Link to comment
Ton Plomp Posted April 15, 2007 Report Share Posted April 15, 2007 Have you tested the 'IS DST' part of the time cluster (last element). I don't have help for 7.1 so don't know what it exactly does... Ton PS 8.x has the option to convert from string to time stamp in one action! Quote Link to comment
alukindo Posted April 15, 2007 Author Report Share Posted April 15, 2007 Hi Ton: Yes, the: 'is DST' cluster element does the trick exactly where and when I need it. I had actually never noticed that this cluster element was there. Thanks much! Anthony L. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.