ESPUI icon indicating copy to clipboard operation
ESPUI copied to clipboard

TimeZone in ISO string {new Date().toISOString()}

Open woodix2023 opened this issue 1 year ago • 1 comments

How to display ISO date and time string taking into account TimeZone?

woodix2023 avatar Mar 05 '24 09:03 woodix2023

I created option/select controls where the user could pick their timezone and pick their DST Type (USA,EU, or None).

I saved those options using arduinojson.

Then I add the timezone value to the iso time hours and add one more ( Hour++) if they are currently in Daylight savings time.

A simpler way may have been to use this branch: https://github.com/s00500/ESPUI/pull/278 but I am not sure because I didn't see that merge request until I had finished implementation.

jberezin avatar Jul 26 '24 09:07 jberezin