Skip to content

Commit

Permalink
Round time to seconds in the header
Browse files Browse the repository at this point in the history
  • Loading branch information
giucam committed Jul 6, 2023
1 parent 0a202af commit e0e5ba3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/app_header/fair_header.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void draw_header_bar(std::string_view title, ImFont *title_font, Style style) {
using namespace detail;
// localtime
const auto clock = std::chrono::system_clock::now();
const auto utcClock = fmt::format("{:%Y-%m-%d %H:%M:%S (LOC)}", clock);
const auto utcClock = fmt::format("{:%Y-%m-%d %H:%M:%S (LOC)}", std::chrono::round<std::chrono::seconds>(clock));
const auto utcStringSize = ImGui::CalcTextSize(utcClock.c_str());

const auto topLeft = ImGui::GetCursorPos();
Expand Down

0 comments on commit e0e5ba3

Please sign in to comment.