summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Turner <digit@google.com>2009-08-21 23:47:50 -0700
committerDavid Turner <digit@google.com>2009-08-21 23:47:50 -0700
commit613d25b8c0fd1ab92c566d965e3cd7da85c31ee0 (patch)
tree985a7be4d5f80fbc95eeb4360cbf893e73324d53
parentdf37ea7b73f8ede7955067d5f7fcac4b9e66b79c (diff)
downloadlibhardware_legacy-donut-release.tar.gz
This fixes a long-standing bug in the GPS emulation, and comes from an open-source contributor (Rene de Groot) See https://review.source.android.com/#change,10251
-rw-r--r--gps/gps_qemu.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gps/gps_qemu.c b/gps/gps_qemu.c
index 249097d..5c06951 100644
--- a/gps/gps_qemu.c
+++ b/gps/gps_qemu.c
@@ -247,12 +247,13 @@ nmea_reader_update_time( NmeaReader* r, Token tok )
minute = str2int(tok.p+2, tok.p+4);
seconds = str2float(tok.p+4, tok.end);
- tm.tm_hour = hour;
- tm.tm_min = minute;
- tm.tm_sec = (int) seconds;
- tm.tm_year = r->utc_year - 1900;
- tm.tm_mon = r->utc_mon - 1;
- tm.tm_mday = r->utc_day;
+ tm.tm_hour = hour;
+ tm.tm_min = minute;
+ tm.tm_sec = (int) seconds;
+ tm.tm_year = r->utc_year - 1900;
+ tm.tm_mon = r->utc_mon - 1;
+ tm.tm_mday = r->utc_day;
+ tm.tm_isdst = -1;
fix_time = mktime( &tm ) + r->utc_diff;
r->fix.timestamp = (long long)fix_time * 1000;