Jef Driesen
a196255841
Replace the clock calibration with a fixed epoch
...
Currently the date/time parsing assumes the reference time (epoch) of
the device clock is unknown. Hence we retrieve the current time of the
device (devtime) and the host system (systime) during the download.
Since both timestamps represent the same instant in time, but with a
different reference time, we can calibrate the device clock as follows:
ticks = parser->systime - (parser->devtime - timestamp) / 2
But this produces wrong results once the device clock has been adjusted
manually. Adjusting the device clock will suddenly increase (or
decrease) the devtime, while the systime continues ticking forwards
normally. Hence all dives recorded before the time adjustment will get
an incorrect date/time value.
Fortunately all devices appear to use a fixed epoch (2000-01-01 00:00:00
UTC) and we can simply replace the calibration with a hardcoded value.
Reported-By: Linus Torvalds <torvalds@linux-foundation.org>
2017-10-23 15:02:38 +02:00
..
2014-12-21 14:52:12 +01:00
2014-12-21 14:52:12 +01:00
2017-07-05 13:11:33 +02:00
2017-07-05 13:11:33 +02:00
2017-08-18 23:26:45 +02:00
2017-08-18 23:17:33 +02:00
2017-04-18 08:41:10 +02:00
2017-06-02 12:11:39 +02:00
2017-06-02 12:11:39 +02:00
2012-06-21 21:39:24 +02:00
2014-03-19 09:16:07 +01:00
2014-03-19 09:16:07 +01:00
2017-08-18 23:26:45 +02:00
2017-08-18 23:17:33 +02:00
2017-04-18 08:41:10 +02:00
2017-08-18 23:26:45 +02:00
2017-09-28 22:01:58 +02:00
2017-04-18 08:41:10 +02:00
2016-01-05 20:40:21 +01:00
2016-01-05 20:40:21 +01:00
2015-11-06 07:52:27 +01:00
2014-05-28 15:41:21 +02:00
2017-08-18 23:26:45 +02:00
2017-08-18 23:17:33 +02:00
2017-04-18 08:41:10 +02:00
2017-08-18 23:26:45 +02:00
2017-08-18 23:17:33 +02:00
2017-04-22 09:11:41 +02:00
2017-08-18 23:26:45 +02:00
2017-09-28 22:00:09 +02:00
2017-08-18 23:17:33 +02:00
2017-08-18 23:17:33 +02:00
2017-08-18 23:26:45 +02:00
2017-08-18 23:17:33 +02:00
2017-04-22 09:11:41 +02:00
2017-09-07 10:26:07 +02:00
2017-08-18 23:17:33 +02:00
2017-04-19 11:33:17 +02:00
2017-08-18 23:17:33 +02:00
2017-04-18 08:41:10 +02:00
2017-09-28 22:02:53 +02:00
2017-04-18 08:41:10 +02:00
2017-08-18 23:26:45 +02:00
2017-08-18 23:17:33 +02:00
2017-04-22 09:11:41 +02:00
2014-03-14 09:44:10 +01:00
2013-08-22 09:15:55 +02:00
2017-09-28 22:02:53 +02:00
2016-05-10 11:34:57 +02:00
2012-06-21 21:42:37 +02:00
2012-06-21 21:42:37 +02:00
2012-12-27 22:00:35 +01:00
2017-08-18 23:17:33 +02:00
2017-09-28 22:02:53 +02:00
2016-05-10 11:34:57 +02:00
2016-05-10 11:34:57 +02:00
2017-08-18 23:26:45 +02:00
2017-08-18 23:17:33 +02:00
2017-04-22 09:11:41 +02:00
2017-08-18 23:26:45 +02:00
2017-08-18 23:17:33 +02:00
2017-04-24 13:05:20 +02:00
2017-08-18 23:26:45 +02:00
2017-08-18 23:17:33 +02:00
2017-04-22 09:11:41 +02:00
2017-08-18 23:17:33 +02:00
2017-04-22 09:11:41 +02:00
2017-08-25 21:25:21 +02:00
2017-08-18 23:17:33 +02:00
2017-04-19 11:33:17 +02:00
2017-02-16 21:04:59 +01:00
2016-08-08 08:38:23 +02:00
2017-09-12 22:34:55 +02:00
2017-08-18 23:17:33 +02:00
2017-04-18 08:41:10 +02:00
2017-08-18 23:26:45 +02:00
2017-08-18 23:17:33 +02:00
2017-04-19 11:33:17 +02:00
2016-01-05 20:40:21 +01:00
2017-06-28 15:32:39 +02:00
2017-09-28 22:02:53 +02:00
2017-02-16 20:34:09 +01:00
2017-02-16 20:34:09 +01:00
2017-04-18 08:41:10 +02:00
2017-08-18 23:17:33 +02:00
2017-04-22 09:11:41 +02:00
2017-04-18 08:41:10 +02:00
2017-08-18 23:17:33 +02:00
2017-04-22 09:11:41 +02:00
2017-04-18 08:41:10 +02:00
2017-08-18 23:17:33 +02:00
2017-04-22 09:11:41 +02:00
2014-03-19 09:16:07 +01:00
2014-03-19 09:16:07 +01:00
2017-02-16 12:00:41 +01:00
2017-02-16 12:00:41 +01:00
2016-05-10 11:34:57 +02:00
2016-05-10 11:34:57 +02:00
2016-05-10 11:34:57 +02:00
2017-08-18 23:17:33 +02:00
2017-05-11 16:18:23 +02:00
2017-08-18 23:26:45 +02:00
2017-08-18 23:17:33 +02:00
2017-05-11 16:18:23 +02:00
2017-02-16 21:04:59 +01:00
2016-01-05 20:40:21 +01:00
2016-01-05 20:40:21 +01:00
2016-01-05 20:40:21 +01:00
2017-09-11 08:25:51 +02:00
2017-09-11 08:25:51 +02:00
2017-04-18 08:41:10 +02:00
2017-08-18 23:26:45 +02:00
2017-08-18 23:17:33 +02:00
2017-04-22 09:11:41 +02:00
2017-09-28 22:02:53 +02:00
2017-09-28 22:02:53 +02:00
2017-04-24 13:05:20 +02:00
2017-04-18 08:41:10 +02:00
2017-08-18 23:17:33 +02:00
2017-04-22 09:11:41 +02:00
2017-08-18 23:17:33 +02:00
2017-04-18 08:41:10 +02:00
2017-08-18 23:26:45 +02:00
2017-08-18 23:17:33 +02:00
2017-04-22 09:11:41 +02:00
2017-10-09 14:35:36 +02:00
2016-09-19 15:04:48 +02:00
2017-08-18 23:17:33 +02:00
2017-04-22 09:11:41 +02:00
2017-09-28 22:06:21 +02:00
2017-06-28 15:32:39 +02:00
2017-04-18 08:41:10 +02:00
2017-08-18 23:17:33 +02:00
2017-04-22 09:11:41 +02:00
2017-08-18 23:17:33 +02:00
2017-04-22 09:11:41 +02:00
2017-10-23 15:02:38 +02:00
2017-08-18 23:17:33 +02:00
2017-04-22 09:11:41 +02:00
2012-12-27 22:00:35 +01:00
2017-08-18 23:17:33 +02:00
2017-04-18 08:41:10 +02:00