mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 02:19:35 +08:00
fixed issue #173 - timezone as output by %z option has a double negative sign
This commit is contained in:
@@ -317,8 +317,10 @@ public:
|
|||||||
|
|
||||||
int h = total_minutes / 60;
|
int h = total_minutes / 60;
|
||||||
int m = total_minutes % 60;
|
int m = total_minutes % 60;
|
||||||
char sign = h >= 0 ? '+' : '-';
|
if (h >= 0) //minus sign will be printed anyway if negative
|
||||||
msg.formatted << sign;
|
{
|
||||||
|
msg.formatted << '+';
|
||||||
|
}
|
||||||
pad_n_join(msg.formatted, h, m, ':');
|
pad_n_join(msg.formatted, h, m, ':');
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user