Creating a specific DateTime

Hi All, I would like to create specific date times, including their GMT offset Here is an example for the special daylight savings day :) 27.10.2019 02:00 GMT+02:00 27.10.2019 02:00 GMT+01:00 How to create a variable for both versions?   Thanks :)    
2 answers

The variable only stores the UTC time. The offset is something the runtime adds.

Or do you want to store the local time as utc time? If so you can use a combination of parseDateTimeUTC and formatDateTime like this:

parseDateTimeUTC(formatDateTime($YourDateTime, FORMAT))

this will convert the time to a string (including offset) and stores it as UTC time.


Try not to confuse GMT offset with locale. Locale is much safer to use (takes care of daylight savings automatically) and is fairly easy to convert from UTC to locale date and back