LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TImeZone abbreviated Codes does not work, mismatched names in Format date/time string output with .net property node ?

Hello,

does anyone know why %Z into a "format date/ time string" function does not give an abbreviation instead of full standard name for time zones. i am looking for a 3 Letter code like PST, MST etc

 

also, the names obtained by above function are different than a ID obtained by LV dotnet TimeZoneInfo property node

https://forums.ni.com/t5/LabVIEW/Get-time-of-different-timezone-s-with-Daylight-Savings/td-p/3097051...

 

for ex:

"Russian Standard Time "in windows shows as "Russia TZ 2 Standard Time" and many more also has unmatched names when obtained by LabVIEW %Z

 

and if i have to match both i can build a look up table but LabVIEW has to be closed and reopened everytime to reflect the change in timezone obtained by format date time string vi.

 

help please,

Thanks 

 

0 Kudos
Message 1 of 7
(3,678 Views)

@freemason wrote:

and if i have to match both i can build a look up table but LabVIEW has to be closed and reopened everytime to reflect the change in timezone obtained by format date time string vi.


Why do you need the time zone string in the first place?

Why do you need to relate he LV strings to .NETs time zone strings or Windows settings time zone strings?

In other words, what are you trying to do?

 

Sorry I can't help you with understanding the time zone strings you're getting. My guess is that there simply isn't any standard for it at all, so each peace of code can (and has to) make up it's own "translation" from number to string.

0 Kudos
Message 2 of 7
(3,494 Views)

Just look in the help:

<%Z> time zone name or abbreviation, depending on the operating system locale settings
"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 7
(3,440 Views)

@paul_cardinale wrote:

Just look in the help:

<%Z> time zone name or abbreviation, depending on the operating system locale settings

However, I couldn't find a system locale setting to actually make a choice. Even then, the zone names seem different that the names used by 'the system'.

0 Kudos
Message 4 of 7
(3,179 Views)

Did you ever find a solution for this?  I'm also having this problem.  Documentation says "time zone name or abbreviation, depending on the operating system locale settings", but I cannot find said operating system locale settings.

0 Kudos
Message 5 of 7
(2,464 Views)

Hi Corey,

 

in Windows you can configure the timezone, the place/location of the computer in this timezone, the language you use, the format of timestamp strings, and some other settings.

They all may affect the timezone abbreviations...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(2,456 Views)

@ParataCorey wrote:

Did you ever find a solution for this?  I'm also having this problem.  Documentation says "time zone name or abbreviation, depending on the operating system locale settings", but I cannot find said operating system locale settings.


DIY it.

 

Get the month number and use your own list...

 

There simply doesn't seem to be a deterministic relation between what LabVIEW uses and the system.

0 Kudos
Message 7 of 7
(2,428 Views)