LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Date time 1 hour shifted in LabVIEW RT.

Hi All,
 
I'm using PXI-8106 with LabVIEW RT v8.5. I got a problem when I tried to log date time string to a file. Attached is a simple program to show the current time. The time has one hour different from 2 date/time functions. I didn't find the same problem when I running the program in windows platform. Is it the problem of RT platform?
 
Best regards.
Bill
0 Kudos
Message 1 of 13
(3,901 Views)
I wonder if this would be related to the recent daylight savings time change.  We are not in a period of daylight savings time, which historically as not been.  Windows computers had to be updated last year a couple of times to handle the new calendar dates for the change in time correctly.  I wonder if an RTOS would need some drivers updated.  (Though I would think post indicators would show it the same.)
 
Which one has the correct time?  Can you put the "display time zone" setting in for the 2 indicators and post it again?  It's on the properties page of the time stamp indicator and would be a format string of %c %Z for the Format Date/Time String function.  Try changing the clock of the PXI system to some time during the summer and sometime during the winter and see if it does the same thing then.
0 Kudos
Message 2 of 13
(3,899 Views)

I would also be inclined to believe that it is related to the daylight savings update:

How Do I Disable Daylight Savings Time on LabVIEW Real-Time Targets?

 

David_B
Applications Engineer
National Instruments
0 Kudos
Message 3 of 13
(3,845 Views)


Ravens Fan wrote:
I wonder if this would be related to the recent daylight savings time change.  We are not in a period of daylight savings time, which historically as not been. 

Sorry, I meant to say we are "now" in a period of daylight savings time, .....
0 Kudos
Message 4 of 13
(3,830 Views)

I think the problem is due to the daylight savings time as well. However, there is no change when I enable or disable it in the MAX. Attached is the modified program that I used all time related VI to show the current time. I have no idea about the root cause of the problem.

Thanks,

Bill

0 Kudos
Message 5 of 13
(3,795 Views)

Hi Bill,

I've done some deeper digging for you and have found that this is actually a bug with the PXI-8106 controller and has been reported to R&D (Corrective Action Request #41190) and will be fixed in a future release.  The problem is that the PharLap OS incorrectly returns the time when the target and host are not both in DST or both out of DST.  Unfortunately, the only work-around at this point is to add or subtract the offset hour.

I apologize for any inconvenience this may cause you in developing your application. Please let us know if you have any further questions.

David_B
Applications Engineer
National Instruments
0 Kudos
Message 6 of 13
(3,762 Views)
Hi David,
 
Thanks so much for your help. I think the problem maybe related to LabVIEW8.5. I got the same problem using 8184 with LabVIEW RT 8.5. I remember that I don't have the same problem of my other programs using LabVIEW8.2. Could you try to use other PXI controller model with LabVIEW8.5 to verify that?
 
Bill
0 Kudos
Message 7 of 13
(3,755 Views)
Sure, I'll see what I can find out for you.  Hopefully I'll have some time on Monday or Tuesday.
David_B
Applications Engineer
National Instruments
0 Kudos
Message 8 of 13
(3,722 Views)
Hi David,
 
I hope you can verify the problem. Since I have a monitoring system which is developing by LabVIEW8.5 and I want to upgrade the old PXI RT(7.1 & 8.2) to integrate with the new system. That's a big problem if the date time is wrong when I log the report file. Therefore I'd like to know the root cause to find out the solution.
 
Best regards,
Bill
0 Kudos
Message 9 of 13
(3,708 Views)

Hi Bill,

It looks like I misread where the problem is originating.  This is an issue since LV 8.5 (as you suspected) and not an issue that is specific to one controller.

A more permanent work around than I previously suggested can be found here (and in the related links):
VxWorks Targets Do Not Honor New Daylight Savings Time Rules

Despite the references to VxWorks and PharLap, this issue seems to be affecting both RTOS.

David_B
Applications Engineer
National Instruments
0 Kudos
Message 10 of 13
(3,691 Views)