summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibTimeZone/TimeZone.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibTimeZone/TimeZone.h')
-rw-r--r--Userland/Libraries/LibTimeZone/TimeZone.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/Userland/Libraries/LibTimeZone/TimeZone.h b/Userland/Libraries/LibTimeZone/TimeZone.h
index 93912695f8..6a1e7b2a81 100644
--- a/Userland/Libraries/LibTimeZone/TimeZone.h
+++ b/Userland/Libraries/LibTimeZone/TimeZone.h
@@ -14,6 +14,16 @@
namespace TimeZone {
+enum class InDST {
+ No,
+ Yes,
+};
+
+struct Offset {
+ i64 seconds { 0 };
+ InDST in_dst { InDST::No };
+};
+
StringView current_time_zone();
Optional<TimeZone> time_zone_from_string(StringView time_zone);
@@ -23,7 +33,7 @@ Optional<StringView> canonicalize_time_zone(StringView time_zone);
Optional<DaylightSavingsRule> daylight_savings_rule_from_string(StringView daylight_savings_rule);
StringView daylight_savings_rule_to_string(DaylightSavingsRule daylight_savings_rule);
-Optional<i64> get_time_zone_offset(TimeZone time_zone, AK::Time time);
-Optional<i64> get_time_zone_offset(StringView time_zone, AK::Time time);
+Optional<Offset> get_time_zone_offset(TimeZone time_zone, AK::Time time);
+Optional<Offset> get_time_zone_offset(StringView time_zone, AK::Time time);
}