This commit is contained in:
gabime 2016-08-26 00:38:08 +03:00
parent cb75569541
commit 8cf39857ab

View File

@ -319,21 +319,21 @@ public:
// it is very fast (already stored in tm.tm_gmtoff)
int total_minutes = os::utc_minutes_offset(tm_time);
#endif
bool is_negative = total_minutes < 0;
char sign;
if (is_negative)
{
total_minutes = -total_minutes;
sign = '-';
}
else
{
sign = '+';
}
bool is_negative = total_minutes < 0;
char sign;
if (is_negative)
{
total_minutes = -total_minutes;
sign = '-';
}
else
{
sign = '+';
}
int h = total_minutes / 60;
int m = total_minutes % 60;
msg.formatted << sign;
msg.formatted << sign;
pad_n_join(msg.formatted, h, m, ':');
}
private: