From 6e30b7af3c233cf18fb514ca4e1572fec94e7db8 Mon Sep 17 00:00:00 2001 From: Michael Cordover Date: Tue, 21 Jan 2020 09:36:41 -0500 Subject: [PATCH] Remove duplicate dependency, use current locale --- include/modules/clock.hpp | 1 + meson.build | 2 -- src/modules/clock.cpp | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/modules/clock.hpp b/include/modules/clock.hpp index aa9a0a22..a10f96a6 100644 --- a/include/modules/clock.hpp +++ b/include/modules/clock.hpp @@ -6,6 +6,7 @@ #else #include #endif +#include #include "ALabel.hpp" #include "util/sleeper_thread.hpp" diff --git a/meson.build b/meson.build index 61f6b4c2..69439aca 100644 --- a/meson.build +++ b/meson.build @@ -66,7 +66,6 @@ gtk_layer_shell = dependency('gtk-layer-shell-0', required: get_option('gtk-layer-shell'), fallback : ['gtk-layer-shell', 'gtk_layer_shell_dep']) systemd = dependency('systemd', required: get_option('systemd')) -date_dep = dependency('date', default_options : [ 'use_system_tzdb=true' ], fallback: [ 'date', 'date_dep' ]) tz_dep = dependency('date', default_options : [ 'use_system_tzdb=true' ], fallback: [ 'date', 'tz_dep' ]) prefix = get_option('prefix') @@ -169,7 +168,6 @@ executable( libudev, libmpdclient, gtk_layer_shell, - date_dep, tz_dep ], include_directories: [include_directories('include')], diff --git a/src/modules/clock.cpp b/src/modules/clock.cpp index d910b2b3..1ad29a3d 100644 --- a/src/modules/clock.cpp +++ b/src/modules/clock.cpp @@ -1,5 +1,4 @@ #include "modules/clock.hpp" -#include waybar::modules::Clock::Clock(const std::string& id, const Json::Value& config) : ALabel(config, "clock", id, "{:%H:%M}", 60) { @@ -52,6 +51,6 @@ struct fmt::formatter> { template auto format(const date::zoned_time& d, FormatContext& ctx) { - return format_to(ctx.out(), "{}", date::format(*format_string, d)); + return format_to(ctx.out(), "{}", date::format(std::locale(""), *format_string, d)); } };