Question Yuhong Snyder · Apr 25, 2024

is there anyway to find the current UTC by city

We are using the IRIS cloud. and I am working on a DTL .

so the source side timestamp is  local time for example 20240110134740,  I know it is a local time. so the requirement is I need to append the UTC at the end, like -0400 or -0500 depending on if it is daylight saving time.  

so is there function to return if current day is at daylight saving time, so I can decide if I need to append the -400 or -500? or a function to return the current UTC by location? 

Product version: IRIS 2023.3

Comments

Lucas Cristofolini · Apr 25, 2024

Hi @Yuhong Snyder

I think this documentation can help, TimeZone

Command:

$ZDATETIME($HOROLOG,8,5)

Output:

20240425T15:29:09-03:00

The -03:00 is because I'm in Brazil, daylight saving time is automatic
If you want to know if the time is in daylight saving time or not, you can use the

$SYSTEM.Util.IsDST(TimeStap).

0
Yuhong Snyder  Apr 25, 2024 to Lucas Cristofolini

Thank you. We just started so we are using cloud version.

Command:

$ZDATETIME($HOROLOG,8,5)

Output:

20240425T19:07:51+00:00  

and for $SYSTEM.Util.IsDST()
the output is 0.

but our local time is on DST right now and it should be UTC -400.

since this is cloud version, do we need to setup something to be in sync with local time?

t=dst=0

0
Lucas Cristofolini  Apr 25, 2024 to Lucas Cristofolini

I believe you'll have to set it manually because the value of $HOROLOG refers to the machine running the IRIS instance. You'll need to set the $ZTIMEZONE to your local time zone.

0