diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2011-09-05 18:08:16 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-05 20:41:59 -0700 |
commit | 98d556c6f69c63e8fd89b7a435f641fbdd836324 (patch) | |
tree | c43cccd8233d7fa9dc84f9b1bd644e5d183f10c0 /parse-xml.c | |
parent | 3cb360b51484f3416289aa52c09d60d87df60027 (diff) | |
download | subsurface-98d556c6f69c63e8fd89b7a435f641fbdd836324.tar.gz |
update UEMIS date_time parsing
Looks like Linus misinterpreted the first UEMIS xml files I sent him.
The date_time appears to be in local time - so the time zone info can be
ignored (that seems strange, but it worked for the dives I tested it
with)
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'parse-xml.c')
-rw-r--r-- | parse-xml.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/parse-xml.c b/parse-xml.c index 90fdb1ad1..36db7e744 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -648,7 +648,7 @@ static void uemis_date_time(char *buffer, void *_when) switch (integer_or_float(buffer, &val)) { case FLOAT: - *when = (val.fp - 40587.5) * 86400; + *when = (val.fp - 40587) * 86400; break; default: fprintf(stderr, "Strange julian date: %s", buffer); @@ -665,10 +665,14 @@ static void uemis_date_time(char *buffer, void *_when) */ static void uemis_time_zone(char *buffer, void *_when) { +#if 0 /* seems like this is only used to display it correctly + * the stored time appears to be UTC */ + time_t *when = _when; signed char tz = atoi(buffer); *when += tz * 3600; +#endif } /* 0 - air ; 1 - nitrox1 ; 2 - nitrox2 ; 3 = nitrox3 */ |