2021-12-28 12:53:53 -05:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2022, Tim Flynn <trflynn89@pm.me>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/Optional.h>
|
|
|
|
|
#include <AK/StringView.h>
|
2022-01-10 16:56:09 -05:00
|
|
|
#include <AK/Time.h>
|
|
|
|
|
#include <AK/Types.h>
|
2021-12-28 12:53:53 -05:00
|
|
|
#include <LibTimeZone/Forward.h>
|
|
|
|
|
|
|
|
|
|
namespace TimeZone {
|
|
|
|
|
|
2022-01-11 23:21:36 -05:00
|
|
|
StringView current_time_zone();
|
|
|
|
|
|
2021-12-28 12:53:53 -05:00
|
|
|
Optional<TimeZone> time_zone_from_string(StringView time_zone);
|
2022-01-10 12:45:16 -05:00
|
|
|
StringView time_zone_to_string(TimeZone time_zone);
|
2022-01-10 12:57:30 -05:00
|
|
|
Optional<StringView> canonicalize_time_zone(StringView time_zone);
|
2021-12-28 12:53:53 -05:00
|
|
|
|
2022-01-10 16:56:09 -05:00
|
|
|
Optional<i64> get_time_zone_offset(TimeZone time_zone, AK::Time time);
|
|
|
|
|
Optional<i64> get_time_zone_offset(StringView time_zone, AK::Time time);
|
|
|
|
|
|
2021-12-28 12:53:53 -05:00
|
|
|
}
|