Skip to content

Commit

Permalink
Nail TZ in geocache logs in text, html to GMT.\n\nThis has been a pro…
Browse files Browse the repository at this point in the history
…blem that's plagued geocaching apps forever
  • Loading branch information
robertlipe committed Oct 25, 2023
1 parent fb40466 commit 88d4ef6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion html.cc
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ HtmlFormat::html_disp(const Waypoint* wpt) const

logpart = curlog->xml_findfirst(u"groundspeak:date");
if (logpart) {
gpsbabel::DateTime logtime = xml_parse_time(logpart->cdata).toLocalTime();
gpsbabel::DateTime logtime = xml_parse_time(logpart->cdata).toUTC();
*file_out << "<span class=\"gpsbabellogdate\">"
<< logtime.toString(u"yyyy-MM-dd") << "</span><br>\n";
}
Expand Down
4 changes: 2 additions & 2 deletions reference/gc/GCGCA8_logs.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
border="0"><br>
<br></div>
<p class="gpsbabellog">
<span class="gpsbabellogtype">Archive</span> by <span class="gpsbabellogfinder">robertlipe</span> on <span class="gpsbabellogdate">2017-11-10</span><br>
<span class="gpsbabellogtype">Archive</span> by <span class="gpsbabellogfinder">robertlipe</span> on <span class="gpsbabellogdate">2017-11-11</span><br>
Removed the container from the final location. Enough construction has occurred since this was placed to make it much less of an adventure than is used to be, so I'm archiving.

Thanx to all that hunted it.</p>
Expand Down Expand Up @@ -110,7 +110,7 @@
<span class="gpsbabellogtype">Found it</span> by <span class="gpsbabellogfinder">jrtoken</span> on <span class="gpsbabellogdate">2016-01-31</span><br>
TFTC!</p>
<p class="gpsbabellog">
<span class="gpsbabellogtype">Found it</span> by <span class="gpsbabellogfinder">momndad2boys</span> on <span class="gpsbabellogdate">2015-09-18</span><br>
<span class="gpsbabellogtype">Found it</span> by <span class="gpsbabellogfinder">momndad2boys</span> on <span class="gpsbabellogdate">2015-09-19</span><br>
Finally! We worked on this for a while! Everything is in great shape! TFTC ACT</p>
<p class="gpsbabellog">
<span class="gpsbabellogtype">Found it</span> by <span class="gpsbabellogfinder">Brotherseldom</span> on <span class="gpsbabellogdate">2015-09-14</span><br>
Expand Down
2 changes: 1 addition & 1 deletion text.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ TextFormat::text_disp(const Waypoint* wpt)

logpart = curlog->xml_findfirst(u"groundspeak:date");
if (logpart) {
gpsbabel::DateTime logtime = xml_parse_time(logpart->cdata).toLocalTime();
gpsbabel::DateTime logtime = xml_parse_time(logpart->cdata).toUTC();;
*file_out << logtime.toString(u"yyyy-MM-dd") << "\n";
}

Expand Down

0 comments on commit 88d4ef6

Please sign in to comment.