mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 18:41:35 +08:00
style
This commit is contained in:
parent
cb75569541
commit
8cf39857ab
@ -319,21 +319,21 @@ public:
|
|||||||
// it is very fast (already stored in tm.tm_gmtoff)
|
// it is very fast (already stored in tm.tm_gmtoff)
|
||||||
int total_minutes = os::utc_minutes_offset(tm_time);
|
int total_minutes = os::utc_minutes_offset(tm_time);
|
||||||
#endif
|
#endif
|
||||||
bool is_negative = total_minutes < 0;
|
bool is_negative = total_minutes < 0;
|
||||||
char sign;
|
char sign;
|
||||||
if (is_negative)
|
if (is_negative)
|
||||||
{
|
{
|
||||||
total_minutes = -total_minutes;
|
total_minutes = -total_minutes;
|
||||||
sign = '-';
|
sign = '-';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sign = '+';
|
sign = '+';
|
||||||
}
|
}
|
||||||
|
|
||||||
int h = total_minutes / 60;
|
int h = total_minutes / 60;
|
||||||
int m = total_minutes % 60;
|
int m = total_minutes % 60;
|
||||||
msg.formatted << sign;
|
msg.formatted << sign;
|
||||||
pad_n_join(msg.formatted, h, m, ':');
|
pad_n_join(msg.formatted, h, m, ':');
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user