fixed issue #173 - timezone as output by %z option has a double negative sign

This commit is contained in:
gabime 2016-02-02 23:41:53 +02:00
parent e91e1b80f9
commit 0c7beb2e36

View File

@ -317,8 +317,10 @@ public:
int h = total_minutes / 60;
int m = total_minutes % 60;
char sign = h >= 0 ? '+' : '-';
msg.formatted << sign;
if (h >= 0) //minus sign will be printed anyway if negative
{
msg.formatted << '+';
}
pad_n_join(msg.formatted, h, m, ':');
}
private: