Date to String Transform in Flow Designer Paris now changes time to UTC when you run a transform. How can we still transform date pills and not lose the local time?

danr2c2
Tera Expert

When performing a Date to String transform in Flow Designer Paris, the system now changes the time to UTC. We use a lot of date to string transforms to present various dates and times to user in a clean and easy to reference way. Obviously this presents an issue if our dates and times are offset to UTC instead of local. How can we still transform date/time pills in Flow Designer Paris and not lose the local time?

 

Edit: To clarify, within Flow Designer I'm attempting to updating a short description and format a date/time pill to a specific format.  In Orlando, the Date to String transform function worked perfectly but that changed in Paris.  Here's a screenshot of the transform I was using:

find_real_file.png

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

please share script etc you are using, the input to the script and the expected outcome

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur, 

It's not a script but a flow designer action step updating a short description.  I'd like to include the date and time in a specific format.  In Orlando, I used a date to string transform function to convert the date/time to my desired format.  However, in Paris, it now returns the date/time in UTC time instead of my local time.  Here's a screenshot of my setup.

find_real_file.png

For example, if I submit a request with 3pm as my time, flow designer transforms my date/time to the specified format but instead of 3pm, I get 11pm.

@danr2c2 

Was this working fine earlier and now after upgrade it is not working?

If yes then please raise HI ticket with ServiceNow

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Prinssi
Mega Sage

Hi @danr2c2,

 

The transform function "Subtract Time" localizes the time before it subtracts the indicated time. 

 

To change the time from UTC to local time, add the Subtract Time transform, but leave the month, day, hour, etc. all at zero.  You can then apply any other transforms (like Date to String) afterwards.

 

Cheers!

Prinssi