diff options
| author | Eugen Wissner <belka@caraus.de> | 2024-06-04 14:56:11 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2024-06-04 14:56:11 +0200 |
| commit | 9c95b1f8644943c52ed1b8361ddb1686d469ce2a (patch) | |
| tree | 75a9df058b156a7075c89c09e3d9f9548ef0280f /src/slack-timedate.h | |
| parent | 263d91efb54624e871cf612e2a0562dc9a2d6a47 (diff) | |
| download | slack-timedate-9c95b1f8644943c52ed1b8361ddb1686d469ce2a.tar.gz | |
Take the timezone link from /etc/localtime
Diffstat (limited to 'src/slack-timedate.h')
| -rw-r--r-- | src/slack-timedate.h | 16 |
1 files changed, 11 insertions, 5 deletions
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<Glib::ustring>& accumulator); - Glib::Variant<std::vector<Glib::ustring>> list_timezones(); -} + class timedate1 + { + void list_timezones(const std::string& prefix, std::vector<Glib::ustring>& accumulator); + + public: + // Returns the timezones available on the system. + Glib::Variant<std::vector<Glib::ustring>> 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 |
