LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get time in UTC format?

Solved!
Go to solution

Hi all,

 

LV 8.6.1 + Windows XP SP2

 

During last weekend my code went to error because current time was changed to summer time. This question might be very easy but I can't find a solution. How I can get current time in UTC format? E.g if local time is 14:30 (+2h, winter time) my code show UTC-time 12:30. When I change current day after May last sunday i get same result. Because summer time is 14:30(+3h, summer time) time should be 11:30. I also want convert time to timestamp control...

 

BR, Jim

0 Kudos
Message 1 of 11
(16,781 Views)
Solution
Accepted by topic author SnowForest
Message 2 of 11
(16,775 Views)

Exactly how does that GetUTCOffset.VI work?

 

Judging by the poor rating it is getting, noone else knows either..

 

Please help.

0 Kudos
Message 3 of 11
(16,413 Views)

Actually that answer just gave a hint to me. After that I made my own UTC-time VI. Maybe this VI helps you...

 

BR, Jim

Message 4 of 11
(16,394 Views)

I know this thread is rather old, but this might help with the original question of displaying a time in UTC.

 

You can make a time stamp indicator show UTC by editing its format string. In the editor select advanced editing mode. You'll see the format as %<something>T (something is the date/time format specifier which may spread over more than one line). Change the format to %^<something>T and the time will show in UTC.

 

Rod.

Message 5 of 11
(16,378 Views)
can i get the format in labview 8.0
0 Kudos
Message 6 of 11
(16,153 Views)

Hi,

 

It is here: 

0 Kudos
Message 7 of 11
(16,130 Views)

Rod wrote:

I know this thread is rather old, but this might help with the original question of displaying a time in UTC.

 

You can make a time stamp indicator show UTC by editing its format string. In the editor select advanced editing mode. You'll see the format as %<something>T (something is the date/time format specifier which may spread over more than one line). Change the format to %^<something>T and the time will show in UTC.

 

Rod.


Anyone have any idea why this info was removed from the Time Format Dialog after LV8.5.1 (see below)? 

 

Does this imply that the capability might go away in the future?

 

It used to be right there, but in LV 8.6 and LV 2009 the selection for "Universal Time Container" is gone.

 

LV 8.5.1:

Display Format Dialog.jpg

 

LV2009:

 Display Format Dialog LV2009.jpg

0 Kudos
Message 8 of 11
(16,025 Views)

Why does nobody use it like this?

 

UTC.jpg

 

Isn't it available in the previous versions of LV?

---

While evaluating my code please have in mind that I am a LV novice. Therefore sometimes my code might violate some coding rules that I have to learn about myself. But how else could I do that... 🙂

Chart zoom with "Mouse Over" effect
Message 9 of 11
(16,015 Views)
In my case I was referring to the display format for a timestamp indicator or constant (as opposed to formatting a timestamp wire into a string).
0 Kudos
Message 10 of 11
(16,009 Views)