Skip to content

Commit

Permalink
GTM: on write, take into correctly timezone value to convert to UTC (…
Browse files Browse the repository at this point in the history
…refs #2696)
  • Loading branch information
rouault committed Jun 20, 2020
1 parent 11fc52a commit 6f6da6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/gtm/gtmwaypointlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ void GTMWaypointLayer::WriteFeatureAttributes( OGRFeature *poFeature, float alti
brokendowndate.tm_sec = sec;
GIntBig unixTime = CPLYMDHMSToUnixTime(&brokendowndate);
if (TZFlag != 0 && TZFlag != 1)
unixTime -= (TZFlag - 100) * 15;
unixTime -= (TZFlag - 100) * 15 * 60;
if (unixTime <= GTM_EPOCH || (unixTime - GTM_EPOCH) != (int)(unixTime - GTM_EPOCH))
{
CPLError(CE_Warning, CPLE_AppDefined,
Expand Down

0 comments on commit 6f6da6f

Please sign in to comment.