Menu

#1 Wrong TZ format for source

open
nobody
None
5
2013-01-05
2013-01-05
sykong
No

The code tries to set TZ using UTC [+|-]hh:mm. There should be no space before the offset. It should be "UTC[+|-]hh:mm".

Change
ntz[4] = *tzs++=='+' ? '-' : '+';
ntz[5] = *tzs++;
ntz[6] = *tzs++;
ntz[7] = ':';
ntz[8] = *tzs++;
ntz[9] = *tzs++;
ntz[10] = '\0';

to
ntz[3] = *tzs++=='+' ? '-' : '+';
ntz[4] = *tzs++;
ntz[5] = *tzs++;
ntz[6] = ':';
ntz[7] = *tzs++;
ntz[8] = *tzs++;
ntz[9] = '\0';

Discussion


Log in to post a comment.