#pragma once #include #include #include namespace radiantwave::timezone { struct TimeZoneInfo { std::string display_name; std::string iana_code; }; struct CountryTimeZones { std::string country_name; std::vector zones; }; // Returns standard Linux / IANA timezones grouped by country const std::vector& getStandardTimeZones(); // Converts a UTC timestamp to the user's configured IANA timezone std::string formatUtcToTimezone(time_t utc_time, const std::string& iana_code, const std::string& format = "%Y-%m-%d %H:%M:%S %Z"); // Wall-clock minutes since midnight (0-1439) right now in `iana_code`. Used by // the schedule to pick the active listening block. Falls back to UTC when the // timezone is empty. int currentLocalMinutes(const std::string& iana_code); // Weekday right now in `iana_code`, 0=Monday .. 6=Sunday. Falls back to UTC when // the timezone is empty. int currentLocalWeekday(const std::string& iana_code); // Gets current UTC timestamp as ISO string std::string getUtcTimestampIso(); } // namespace radiantwave::timezone