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)); } };