diff options
| author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-09-30 15:51:54 +0200 |
|---|---|---|
| committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-09-30 15:51:54 +0200 |
| commit | 467f41e7fb8542acef795e591bfd7314e0603cb1 (patch) | |
| tree | a1905dad28fd70ec98096ed071d8b244cd91c933 /src/simulator | |
| parent | f3f471c65a8c1a16b203c4240a5e5ea1e09205ba (diff) | |
| download | glutte-o-matic-467f41e7fb8542acef795e591bfd7314e0603cb1.tar.gz glutte-o-matic-467f41e7fb8542acef795e591bfd7314e0603cb1.tar.bz2 glutte-o-matic-467f41e7fb8542acef795e591bfd7314e0603cb1.zip | |
tm_mon is zero-indexed, unlike the month in GNRMC
Fixes wrong DST correction, and likely problem we would have in December
Diffstat (limited to 'src/simulator')
| -rw-r--r-- | src/simulator/src/Core/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/simulator/src/Core/main.c b/src/simulator/src/Core/main.c index 215ead5..a73306d 100644 --- a/src/simulator/src/Core/main.c +++ b/src/simulator/src/Core/main.c @@ -160,7 +160,7 @@ static void thread_gui_gps(void __attribute__ ((unused))*arg) { if (gui_gps_send_current_time) { - sprintf(gps_frame_buffer + gps_buffer_pointer, "%02d%02d%02d", t->tm_mday, t->tm_mon, t->tm_year - 100); + sprintf(gps_frame_buffer + gps_buffer_pointer, "%02d%02d%02d", t->tm_mday, t->tm_mon + 1, t->tm_year - 100); } else { strcpy(gps_frame_buffer + gps_buffer_pointer, "000000"); @@ -173,7 +173,7 @@ static void thread_gui_gps(void __attribute__ ((unused))*arg) { day = t->tm_mday; } if (!gui_gps_custom_month_on) { - mon = t->tm_mon; + mon = t->tm_mon + 1; } if (!gui_gps_custom_year_on) { year = t->tm_year - 100; |
