LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Date/Time returns wrong time

Hello,

I want to create a time stamp and use the Get Date/Time function. The result is displayed by an indicator.

The VI works on all computer I found, except mine. I always get a time difference of 3 hours (based on GMT+1).

The picture demonstrates the VI and the result.

We are using: LV 8.21, Win XP Prof. Serv. Pack 2, Dell Precision T3400

I reinstalled LV and tried a repair Installation of Win XP. No change.

Any idea how to harmonize LV time with windows time on my computer?

Thanks.

Manfred

 

0 Kudos
Message 1 of 14
(5,200 Views)

Manfred,

 

what timezone is configured in your pc?

I have to confess that i never saw that "W. Europe Standard Time" in the timestamp display before. So either you added it manually or it should inform you about a mismatch of the shown time to the system time....

 

Norbert 

 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 14
(5,184 Views)

Hello Norbert,

 

My time zone is GMT+1:00 (Berlin), translated by WinXP to the text W. Europe Daylight Time, since the automatic adjust for daylight saving is enabled.

Without this setting the text is W. Europe Standard time.

I tried with different time zones. LV retrieves the correct text (except the daylight saving information), but the numerical value does not change. It seems that LV always shows the time zone GMT-02:00 (mid atlantic) regardless of the actual time zone and the daylight setting.

Additionally I checked the Bios clock, but it shows the correct time.

As I mentioned all other pc I found do not show this behaviour.

Also I checked time settings and regional setting with other pc. No change.

 

Thanks for any further idea what I should check.

 

Manfred

 

 

0 Kudos
Message 3 of 14
(5,155 Views)

Manfred,

 

this is real a strange issue. Please check if "Get Date/Time String" creates the same offset on this machine....

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 4 of 14
(5,148 Views)

Hello Norbert,

 

yes it does also create the same wrong time.

 

I just checked to indicate the seconds as numerical value. Compared with a second pc with identical time setting the result is the same. So I believe the system time is fully correct. Two things are wrong:

- LV does not use the daylight saving information

- and the numerical time indication is fixed to GMT-02:00 although the shown time zone is correct

 

Also I just checked two additional Dell 3400 pc which are nearly identical: no problem.

So it seems to be an isolated problem of my actual pc.  

 

Thanks.

 

Manfred

 

0 Kudos
Message 5 of 14
(5,143 Views)

Check the representation of the control, this can alter the displayed value as well, it look like it is using GMT time. Allthough a 3 hour offset is weird.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 6 of 14
(5,141 Views)

Manfred,

 

i am not sure, but maybe there is a disturbing entry in your LabVIEW.ini. Maybe you should try and copy this LabVIEW.ini from a working PC to the problematic one...

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 7 of 14
(5,139 Views)

Hello Ton,

 

I attached an actual version of my primitive test VI.

Since the value of the seconds is correct, the problem resides inside the indicator and all functions interpreting the time stamp.

I could not find any possibility to change LV time interpretation of the indicator. All settings seem to be identical with other pc. 

 

Manfred

 

0 Kudos
Message 8 of 14
(5,137 Views)

Manfred,

 

see attached picture for the result of your vi on my machine....

Still it is unclear to me how you managed the display of the timezone setting in the indicator though....

 

So something in your machine is changing this timestamp... on a short term solution, just add three hours; but that could lead to errors when winter time starts......

 

still very surprised,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 9 of 14
(5,119 Views)

Hello Norbert,

 

with a right click on the indicator you get a menu where you can make different settings including the time zone indication. See attachment.

What was your local pc time at run time?

 

Of course, adding three ours is one of the work arround. But the VI shall run on other pc too.

 

 

Manfred

 

 

0 Kudos
Message 10 of 14
(5,109 Views)