Flow Designer: how to use Date/Time Data Transform when not in UTC?

blairf
Giga Expert

I see a long history of questions and answers related to date/time functions, and time zones.  But in Flow Designer, a Data Transform is provided.  It can easily add/subtract days, hours, minutes.  However, it assumes the input is in UTC, and it provides output in UTC.  This seems useless if you are not living in UTC.  And I can't adjust for it because my time zone has Daylight Savings.  Has anyone been able to use the Data Transforms successfully?

https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/administer/flow-designer/referen...

 

1 ACCEPTED SOLUTION

blairf
Giga Expert

First, here's the confirmation of a bug by support:

I was able to reproduce the issue in out of the box configuration. It seems that the when the property "glide.sys.default.tz" is changed to something other than GMT, we get this unexpected behavior. So currently the workaround would be to set the property to GMT and then set the user's timezone field accordingly.

Second, here's the plan to fix it:

The following PRB was associated with this case:
PRB1374580 - Transform feature - Add Time feature not working properly
- schedule to be fixed in Paris

View solution in original post

4 REPLIES 4

Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

Hi,

The reason why it's like this is that the time is always saved as UTC. Then depending on who is watching it, the display value changes after the timezone, etc.

Does that make sense?

//Göran
Feel free to connect:
LinkedIn
Subscribe to my YouTube Channel
or look at my Book: The Witch Doctor's Guide To ServiceNow

Yes, but, here is what I'm experiencing:

I see Planned Start Date = June 30 00:00:00.  I am EST time zone (4 hrs different from UTC).

I apply a Data Transform to add 8 hours.

The result I see is June 30 12:00:00.

Ahhh Now I get you and I test it myself and got the strange result you got as well. I think you found a bug here. I couldn't find any report on this, but my HI Search has some improvements spots open. I would like you to create a HI ticket for this and I'll ask around as well to see if I can get some more info on this.

//Göran
Feel free to connect:
LinkedIn
Subscribe to my YouTube Channel
or look at my Book: The Witch Doctor's Guide To ServiceNow

blairf
Giga Expert

First, here's the confirmation of a bug by support:

I was able to reproduce the issue in out of the box configuration. It seems that the when the property "glide.sys.default.tz" is changed to something other than GMT, we get this unexpected behavior. So currently the workaround would be to set the property to GMT and then set the user's timezone field accordingly.

Second, here's the plan to fix it:

The following PRB was associated with this case:
PRB1374580 - Transform feature - Add Time feature not working properly
- schedule to be fixed in Paris