Timezones in vl

Hi,

I’m working on a small application in vvvv gamma where I need to work with dates and times for a location in a different time zone than the machine running the application.

I’d like to generate the current local time for a specific time zone (e.g. Asia/Riyadh) without changing the Windows system clock.

In .NET I would normally use something like TimeZoneInfo, but I can’t seem to find an equivalent in the Node Browser.

How do I handle this in VL?

Vincent

If you know the timezone beforehand you can just add the offset to UTCNow I guess. Riyadh is UTC+3.

Yes, that’s what I ended up doing. I’m just not sure how it will behave when switching between summer and winter time, especially since not all countries observe daylight saving time. I was hoping there was a way to handle that automatically.

You can reference System.Runtime.dll and then use TimeZoneInfo.

TimeZone.vl (10.5 KB)

Aha, @bjoern was faster, just to add my 2 cents, this is where you can add those .Net assemblies:

ahhhhhh!!! that’s what i needed! THANKS!!!

And as a rule of thumb:
create a document for those external nodes / assembly references.

And then you use this document.

Why? To keep your nodebrowser clean basically.

ahhh tooo late!!! you are right!!!