Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
spdlog
Commits
cb755695
Commit
cb755695
authored
Aug 26, 2016
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue #266 (Improperly-formatted ISO8601 UTC offset for negative-offset timezones)
parent
bf327be7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
636 additions
and
628 deletions
+636
-628
include/spdlog/details/pattern_formatter_impl.h
include/spdlog/details/pattern_formatter_impl.h
+636
-628
No files found.
include/spdlog/details/pattern_formatter_impl.h
View file @
cb755695
...
...
@@ -319,13 +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
=
'+'
;
}
int
h
=
total_minutes
/
60
;
int
m
=
total_minutes
%
60
;
if
(
h
>=
0
)
//minus sign will be printed anyway if negative
{
msg
.
formatted
<<
'+'
;
}
msg
.
formatted
<<
sign
;
pad_n_join
(
msg
.
formatted
,
h
,
m
,
':'
);
}
private:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment