Skip to content

Commit

Permalink
Fix conversion warning on chrono.h
Browse files Browse the repository at this point in the history
warning: conversion from 'time_t' {aka 'long long int'} to 'long int' may change value [-Wconversion]
  • Loading branch information
Ottani committed Sep 20, 2024
1 parent 23fcf19 commit 9866d5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fmt/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ class tm_writer {
std::time_t gt = std::mktime(&gtm);
std::tm ltm = gmtime(gt);
std::time_t lt = std::mktime(&ltm);
long offset = gt - lt;
long offset = static_cast<long>(gt - lt);
write_utc_offset(offset, ns);
#endif
}
Expand Down

0 comments on commit 9866d5d

Please sign in to comment.