Dear Alexander,
while searching for a portable way to get the gmt offset I have found out
that your patches set the wrong semi-octet to de/encode the sign.
3GPP TS 03.40 ch. 9.2.3.11 specifies that "bit 3 of the seventh octet of the
TP-Service-Centre-Time-Stamp field [...] represents the algebraic sign of this
difference."
This is because the more significant digit is encoded in bits 0-3. Currently a
two hour time offset (8*15min) will beencoded as 0x80 which will be decoded as
-0.
Please take a look at my two patches and squash them into yours.
[FIX 1/2] fixup! sms: Fix gsm340_scts() to correctly decode absolute
[FIX 2/2] fixup! sms: Fix support of negative timezone offsets in
Regards,
Daniel