Remove duplicate dependency, use current locale

This commit is contained in:
Michael Cordover 2020-01-21 09:36:41 -05:00 committed by Michael Cordover
parent 3130a57622
commit 6e30b7af3c
3 changed files with 2 additions and 4 deletions

View File

@ -6,6 +6,7 @@
#else
#include <fmt/chrono.h>
#endif
#include <date/tz.h>
#include "ALabel.hpp"
#include "util/sleeper_thread.hpp"

View File

@ -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')],

View File

@ -1,5 +1,4 @@
#include "modules/clock.hpp"
#include <date/tz.h>
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<date::zoned_time<ZonedTimeInner>> {
template <typename FormatContext>
auto format(const date::zoned_time<ZonedTimeInner>& 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));
}
};