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
de2c07ac
Commit
de2c07ac
authored
Nov 08, 2019
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
always cache gmt offset
parent
844d54d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
10 deletions
+1
-10
include/spdlog/details/pattern_formatter-inl.h
include/spdlog/details/pattern_formatter-inl.h
+1
-10
No files found.
include/spdlog/details/pattern_formatter-inl.h
View file @
de2c07ac
...
@@ -593,14 +593,7 @@ public:
...
@@ -593,14 +593,7 @@ public:
const
size_t
field_size
=
6
;
const
size_t
field_size
=
6
;
ScopedPadder
p
(
field_size
,
padinfo_
,
dest
);
ScopedPadder
p
(
field_size
,
padinfo_
,
dest
);
#ifdef _WIN32
auto
total_minutes
=
get_cached_offset
(
msg
,
tm_time
);
int
total_minutes
=
get_cached_offset
(
msg
,
tm_time
);
#else
// No need to cache under gcc,
// it is very fast (already stored in tm.tm_gmtoff)
(
void
)(
msg
);
int
total_minutes
=
os
::
utc_minutes_offset
(
tm_time
);
#endif
bool
is_negative
=
total_minutes
<
0
;
bool
is_negative
=
total_minutes
<
0
;
if
(
is_negative
)
if
(
is_negative
)
{
{
...
@@ -619,7 +612,6 @@ public:
...
@@ -619,7 +612,6 @@ public:
private:
private:
log_clock
::
time_point
last_update_
{
std
::
chrono
::
seconds
(
0
)};
log_clock
::
time_point
last_update_
{
std
::
chrono
::
seconds
(
0
)};
#ifdef _WIN32
int
offset_minutes_
{
0
};
int
offset_minutes_
{
0
};
int
get_cached_offset
(
const
log_msg
&
msg
,
const
std
::
tm
&
tm_time
)
int
get_cached_offset
(
const
log_msg
&
msg
,
const
std
::
tm
&
tm_time
)
...
@@ -632,7 +624,6 @@ private:
...
@@ -632,7 +624,6 @@ private:
}
}
return
offset_minutes_
;
return
offset_minutes_
;
}
}
#endif
};
};
// Thread id
// Thread id
...
...
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