On 10/01/2013 11:00 PM, Peter Stuge wrote:
Jacob Erlbeck wrote:
+ if ((tz_hours < -19) || (tz_hours > 19)
||
+ (tz_mins < 0) || (tz_mins >= 60) || (tz_mins % 15 != 0) ||
+ (tz_dst < 0) || (tz_dst > 2))
+ goto err;
No need for all these parentheses, but oh well.
It's at least consistent to the style already present in that file.
More importantly - are you sure that daylight savings is only ever 0,
1 or 2 hours? I seem to remember that this isn't true for some odd
place, but unfortunately I don't remember where, so this would need
a bit of research.. :\
That reflects the possible values for the "Daylight Saving Time"
information element being described in 3GPP TS 24.008, 10.5.3.12. So
even if there were countries with e.g. 3 hours DST we couldn't encode
it:
Daylight Saving Time value (octet 3)
Bits
2 1
0 0 No adjustment for Daylight Saving Time
0 1 +1 hour adjustment for Daylight Saving Time
1 0 +2 hours adjustment for Daylight Saving Time
1 1 Reserved
(Quoted from Table 10.5.97a/3GPP TS 24.008)
Jacob