mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
3cb360b514
commit
98d556c6f6
1 changed files with 5 additions and 1 deletions
|
@ -648,7 +648,7 @@ static void uemis_date_time(char *buffer, void *_when)
|
||||||
|
|
||||||
switch (integer_or_float(buffer, &val)) {
|
switch (integer_or_float(buffer, &val)) {
|
||||||
case FLOAT:
|
case FLOAT:
|
||||||
*when = (val.fp - 40587.5) * 86400;
|
*when = (val.fp - 40587) * 86400;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "Strange julian date: %s", buffer);
|
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)
|
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;
|
time_t *when = _when;
|
||||||
signed char tz = atoi(buffer);
|
signed char tz = atoi(buffer);
|
||||||
|
|
||||||
*when += tz * 3600;
|
*when += tz * 3600;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 0 - air ; 1 - nitrox1 ; 2 - nitrox2 ; 3 = nitrox3 */
|
/* 0 - air ; 1 - nitrox1 ; 2 - nitrox2 ; 3 = nitrox3 */
|
||||||
|
|
Loading…
Add table
Reference in a new issue