cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
670
Views
0
Helpful
4
Replies

ICM Script Editor UTC Timestamp

larsen.jimmi
Level 1
Level 1

Hi all,

 

What is the best way to populate a peripheral variable with the current timestamp in UTC?

I've tried using now(), however I am not able to reconcile the fraction portion of the output (it seems to be 30 minutes off local time?).

 

Any ideas? This should be easy, the router is aware of the current time in UTC.

4 Replies 4

Omar Deen
Spotlight
Spotlight

It'll return whatever time is on the Central Controllers. If it's off from where you need it to be, you can add or subtract hours and minutes and plug that into a PV

If now doesn't do it for you (and I would investigate why you say the time is 30 minutes off from what you expect, since that could give you bigger routing problems down the road), you could also concatenate the various hour/minute/second variables into what you need, but that seems like a lot more work.

larsen.jimmi
Level 1
Level 1

I was hoping there was an easy way to do this without having to manually maintain it (considering daylight savings), something like nowUTC(), given that the Router is aware of the time in UTC (rttest -> status confirms this).

david.macias
VIP Alumni
VIP Alumni

For true UTC I would have the peripheral (CVP) do it.

 

david