Changeset 8b2de77 in subsurface


Ignore:
Timestamp:
Feb 10, 2017, 8:30:58 PM (10 days ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
b53fdc0
Parents:
f7045c5
git-author:
Salvador Cuñat <salvador.cunat@…> (01/22/17 05:08:43)
git-committer:
Dirk Hohndel <dirk@…> (02/10/17 20:30:58)
Message:

smtk-import-change mktime with timegm

There were 1 or 2 hour differences between real dive time and the
imported time because of the time zones and energy saving in some locales.
Using timegm() ensures us UTC times instead of localized times.

Signed-off-by: Salvador Cuñat <salvador.cunat@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • smtk-import/smartrak.c

    rf7045c5 r8b2de77  
    768768                smtk_date_to_tm(col[coln(DATE)]->bind_ptr, tm_date);
    769769                smtk_time_to_tm(col[coln(INTIME)]->bind_ptr, tm_date);
    770                 smtkdive->dc.when = smtkdive->when = mktime(tm_date);
     770                smtkdive->dc.when = smtkdive->when = timegm(tm_date);
    771771                free(tm_date);
    772772                smtkdive->dc.surfacetime.seconds = smtk_time_to_secs(col[coln(INTVAL)]->bind_ptr);
Note: See TracChangeset for help on using the changeset viewer.