In my example, I am using an arbitrary Unix timestamp (value of 1494290000) which is equivalent to May 9 2017 00:33:20 UTC.
In my demo, I create a Gregorian.Info object from
var timestruct = Gregorian.info(new Time.Moment(1494290000 ), Time.FORMAT_SHORT);and then display it using the year, month, day, hour, min and sec functions.
formattedReportTime = timestruct.year
+"-"+ timestruct.month.format("%02u")
+"-"+ timestruct.day.format("%02u")
+"\n"+ timestruct.hour.format("%02u")
+ ":" + timestruct.min.format("%02u")
+ ":" + timestruct.sec.format("%02u"); Under normal circumstances, it correctly displays
May 9 2017 10:33:20 (As I'm in Sydney, UTC=10 )However,if I manually set my watch 30 mins slow, (change time settings from auto to manual and alter the minutes) it displays
May 9 2017 10:03:20 or 30 minutes earlier.By messing with the time, I have found that the error in the conversion matches the difference between the watch time and the "true" time, which I believe it gets from the GPS.
I can only demonstrate this on a watch (VA-HR) as it's not possible to mess with the time settings in the emulator.
I'm posting this here, rather than report it as a bug in case it turns out I'm missing something in my logic.