Message ID | 02248a12c3e51d7e5f8b9ae9e3c54569b706e31a.1395869732.git.daniel@totalueberwachung.de |
---|---|
State | New |
Headers | show |
diff --git a/src/gsm/gsm0411_utils.c b/src/gsm/gsm0411_utils.c index 197f2c3..3052dd7 100644 --- a/src/gsm/gsm0411_utils.c +++ b/src/gsm/gsm0411_utils.c @@ -120,8 +120,8 @@ time_t gsm340_scts(uint8_t *scts) /* according to gsm 03.40 time zone is "expressed in quarters of an hour" */ tz = *scts++; - ofs = gsm411_unbcdify(tz&0x7f) * 15*60; - if (tz&0x80) + ofs = gsm411_unbcdify(tz&0xf7) * 15*60; + if (tz&0x08) ofs = -ofs; /* mktime() doesn't take tm.tm_gmtoff into account. Instead, it fills this * field with the current timezone. Which means that the resulting time is