From 9c95b1f8644943c52ed1b8361ddb1686d469ce2a Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Tue, 4 Jun 2024 14:56:11 +0200 Subject: Take the timezone link from /etc/localtime --- src/slack-timedate.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/slack-timedate.h') diff --git a/src/slack-timedate.h b/src/slack-timedate.h index f833387..c80cbf2 100644 --- a/src/slack-timedate.h +++ b/src/slack-timedate.h @@ -63,12 +63,18 @@ namespace dlackware::timedate { constexpr const char *zoneinfo_database = "/usr/share/zoneinfo"; - void list_timezones(const std::string& prefix, std::vector& accumulator); - Glib::Variant> list_timezones(); -} + class timedate1 + { + void list_timezones(const std::string& prefix, std::vector& accumulator); + + public: + // Returns the timezones available on the system. + Glib::Variant> list_timezones(); -// Returns the system time zone -gchar *slack_get_timezone (); + // Returns the system time zone. + Glib::ustring timezone(); + }; +} // Sets the system time zone to the one passed by the argument // Returns true on success, false otherwise -- cgit v1.2.3