Question

When Using system:date, I would like to modify the timezone Option (cf screenshot) for one Bot that is supposed to work on Japan Time, when the others are on Singapore time zone. Is it feasible?

  • 4 March 2022
  • 4 replies
  • 23 views

DateTime


4 replies

Userlevel 3
Badge +7

Hi @Olivier Chatelain​ ,

 

I do see an option to toggle the Default value over to Singapore while declaring the Datetime Variable:

 

imageIs this what you were looking for?

 

Kind Regards,

Ashwin A.K

Hello,

Thanks for your answer.

It's only affecting the Default value. You can't use it to fix the time zone of your variable.

I don't see how to manage it easily, independantly of the server internal time zone. (I may add hours but it's not clean)

 

Olivier

After several test, I arrive to the following conclusion:

 

When you use the System:Date to get the time, you will then get the local time.

 

to get the time independently of the server, you can use the format ISO_INSTANT: it gives you the time UTC (the format is a bit strange!)

 

I use this to get the hour independently from the server timezone:

 

  1- assign UTC time to a string

  2- transform string as a date

  3- add the required time to your time zone (ex: Japan UTC+9)

 

Note: main point to test: Winter/Summer time management

 

Regards

Hi Olivier, Could you please explain in detail? that would really help me. I'm not able to follow it.

Reply