File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -525,16 +525,15 @@ class z_formatter final : public flag_formatter {
525525 void format (const details::log_msg &msg, const std::tm &tm_time, memory_buf_t &dest) override {
526526 const size_t field_size = 6 ;
527527 ScopedPadder p (field_size, padinfo_, dest);
528-
529- if (time_type_ == pattern_time_type::utc) {
530- dest.append (" +00:00" , " +00:00" + 6 );
531- return ;
532- }
533-
534528#ifdef SPDLOG_NO_TZ_OFFSET
535529 const char *str = " +??:??" ;
536530 dest.append (str, str + 6 );
537531#else
532+ if (time_type_ == pattern_time_type::utc) {
533+ const char *zeroes = " +00:00" ;
534+ dest.append (zeroes, zeroes + 6 );
535+ return ;
536+ }
538537 auto total_minutes = get_cached_offset (msg, tm_time);
539538 bool is_negative = total_minutes < 0 ;
540539 if (is_negative) {
You can’t perform that action at this time.
0 commit comments