From: robertlipe Date: Wed, 17 Jul 2013 01:53:12 +0000 (+0000) Subject: Make maggeo consistent about TZ when reading and writing dates. (This is X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~11^2~514 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2b559ccca1db93c78eb01d4c3da4d8d9cf890736;p=gpsbabel.git Make maggeo consistent about TZ when reading and writing dates. (This is still grubby code, but it's hardly strategic...) --- diff --git a/gpsbabel/defs.h b/gpsbabel/defs.h index 17361a9f8..bae38ef4c 100644 --- a/gpsbabel/defs.h +++ b/gpsbabel/defs.h @@ -275,7 +275,6 @@ class geocache_data { is_available(status_unknown), is_memberonly(status_unknown), has_customcoords(status_unknown), - last_found(0), placer_id(0), favorite_points(0) {} @@ -288,8 +287,8 @@ class geocache_data { status_type is_available:2; status_type is_memberonly:2; status_type has_customcoords:2; - gpsbabel::DateTime exported; - time_t last_found; + gpsbabel::DateTime exported; + gpsbabel::DateTime last_found; QString placer; /* Placer name */ int placer_id; /* Placer id */ QString hint; /* all these UTF8, XML entities removed, May be not HTML. */ diff --git a/gpsbabel/maggeo.cc b/gpsbabel/maggeo.cc index fda2a439d..a3b7f43da 100644 --- a/gpsbabel/maggeo.cc +++ b/gpsbabel/maggeo.cc @@ -188,7 +188,7 @@ maggeo_fmtdate(time_t t) cbuf[0] = '\0'; if (t > 0) { - tm = gmtime(&t); + tm = localtime(&t); if (tm) { date = tm->tm_mday * 100000 + (1+tm->tm_mon) * 1000 + tm->tm_year;