Ticket Created
over 3 years ago

WERETECH-11004

Transferred

ClockTime.dst is 0 on the watch, correct value on the simulator

Description

ClockTime.dst is 0 on the watch, correct value on the simulator.

Also reported here:

https://forums.garmin.com/developer/connect-iq/f/discussion/257552/system-getclocktime-dst-is-3600-in-the-simulator-but-zero-on-my-watch

6 years ago, it was suggested that dst would be removed:

https://forums.garmin.com/developer/connect-iq/f/discussion/127/sys-getclocktime-never-provides-a-value-for-dst

In preview 2 we are adding a field in ClockTimer named timeZoneOffset which gives the number of seconds from UTC the current time is. Long term I think we will probably remove the DST flag, as I'm not sure it adds a lot of utility.

Another conceivable way of determining the current DST offset would be to get the local/UTC deltas of the current time and two other dates during the year (July 1 and December 1). Unfortunately, this only works on the sim and not on a real watch: https://forums.garmin.com/developer/connect-iq/i/bug-reports/gregorian-info-handles-dst-incorrectly-for-dates-other-than-now-today-works-in-sim-not-on-device

Recreation

Display value of System.getClockTime().dst on both the sim and a real device (e.g. 935), during Daylight Savings Time. In my timezone (Eastern), the sim returns 3600 and the watch returns 0.

Environment

- Windows 10

- VS Code

- SDK 3.2.5

- Garmin 935 21.00