Hi all,
I am looking for a conversion from my system timezone say (IST) to UTC (00:00) timezone. I have used toUTCString function and then reverted back to YYYY-MM-DD hh:mm:ss format (DateTime as output) but it fails. So, what is an alternative to achieve this?
Thank you
Hello,
Where would you like this conversion to happen?
If you are thinking about backend then all dates are handled using UTC (unless you have changed the timezone in the platform configurations).
If you are thinking about frontend then thingworx also automatically converts from UTC to the browsers local time.
I'm not sure it is possible to use the datetime variable type for this, instead you might have more luck using a string (as it will not get converted).
Regards,
Jens
Hi Jens,
Thank you for the quick response, yes I am trying at the backend, I have a service where I am giving the DateTime, by default the time is set to 00:00, so when I set my system to UTC, on hover of the graph shows correct data i.e. 00:00 but when I change say IST then it shows 5:30 on hover, so I want to know if my input itself can be converted into UTC then my output will always show 00:00.
Thank you!
Hello,
Thank you for your clarifications.
I found this support ticket: Link
Perhaps it can help you. There seem to be some information to prevent datetime conversions.
Regards,
Jens