summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibTimeZone/TimeZone.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Userland/Libraries/LibTimeZone/TimeZone.h b/Userland/Libraries/LibTimeZone/TimeZone.h
index e813c9d7ad..52e20170f3 100644
--- a/Userland/Libraries/LibTimeZone/TimeZone.h
+++ b/Userland/Libraries/LibTimeZone/TimeZone.h
@@ -9,6 +9,7 @@
#include <AK/Array.h>
#include <AK/DeprecatedString.h>
#include <AK/Error.h>
+#include <AK/Format.h>
#include <AK/Optional.h>
#include <AK/StringView.h>
#include <AK/Time.h>
@@ -74,3 +75,11 @@ StringView region_to_string(Region region);
Vector<StringView> time_zones_in_region(StringView region);
}
+
+template<>
+struct AK::Formatter<TimeZone::TimeZone> : Formatter<FormatString> {
+ ErrorOr<void> format(FormatBuilder& builder, TimeZone::TimeZone const& time_zone)
+ {
+ return Formatter<FormatString>::format(builder, TimeZone::time_zone_to_string(time_zone));
+ }
+};