Env: Windows 10, fenix3HR, firmware 4.2, display 3.5, GPS ver:3.0, BLE/ANT:3.6, WiFi:2.1, CiQ:1.4.2, WHR:2.8
Eclipse: Néon 1.a release 4.6.1
Hi,
When using the api System::getClockTime(), the dst field is always zero on watch even in a country that has daylight saving active, whereas in the simulator, dst is equal to 3600 since end of march.
When executing the code in PARIS, France, I get:
using Toybox.System as Sys;
var clockTime = Sys.getClockTime();
var utcOffset = new Time.Duration(clockTime.timeZoneOffset);
Sys.println("utc offset: "+ (utcOffset.value()/3600).format("%d") + "h");
if (null!=clockTime.dst)
{
var dst = clockTime.dst/3600;
Sys.println("DST: "+ dst.format("%d")+"h");
}
- on simulator:
utc offset: 2h
DST: 1h
- on watch:
utc offset: 2h
DST: 0h
Result on simulator are ok since Paris is in a timezone UTC+1 in fall/winter and UTC+2 in spring/summer since daylight saving is active in spring/summer. But dst field remains == 0 whatever the date in the year.
thanks,