Description
ClockTime.dst is 0 on the watch, correct value on the simulator.
Also reported here:
6 years ago, it was suggested that dst would be removed:
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