refactor(clock): remove struct waybar_time

The structure was used to pass the locale instance to the date
formatter. All the supported versions of `fmt` are passing the locale
parameter via `FormatContext.locale()` so we can remove the struct and
simplify the code.

While we at it, drop `date::make_zoned` in favor of CTAD on a
`date::zoned_time` constructor.
This commit is contained in:
Aleksei Bavshin
2023-01-16 16:48:30 -08:00
parent ba498869c5
commit 67efe1af89
6 changed files with 117 additions and 133 deletions

View File

@ -15,7 +15,7 @@ test_src = files(
if tz_dep.found()
test_dep += tz_dep
test_src += files('waybar_time.cpp')
test_src += files('date.cpp')
endif
waybar_test = executable(