2022-04-23 10:59:50 +02:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2020-05-11 23:51:26 +02:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-05-24 00:32:28 +02:00
|
|
|
#include <array>
|
2020-05-13 00:44:07 +02:00
|
|
|
#include <chrono>
|
2020-05-11 23:51:26 +02:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace Common::TimeZone {
|
|
|
|
|
2023-05-24 00:32:28 +02:00
|
|
|
[[nodiscard]] const std::array<const char*, 46>& GetTimeZoneStrings();
|
|
|
|
|
2020-05-11 23:51:26 +02:00
|
|
|
/// Gets the default timezone, i.e. "GMT"
|
2020-08-14 15:38:45 +02:00
|
|
|
[[nodiscard]] std::string GetDefaultTimeZone();
|
2020-05-11 23:51:26 +02:00
|
|
|
|
|
|
|
/// Gets the offset of the current timezone (from the default), in seconds
|
2020-08-14 15:38:45 +02:00
|
|
|
[[nodiscard]] std::chrono::seconds GetCurrentOffsetSeconds();
|
2020-05-11 23:51:26 +02:00
|
|
|
|
2023-05-24 00:32:28 +02:00
|
|
|
/// Searches time zone offsets for the closest offset to the system time zone
|
|
|
|
[[nodiscard]] std::string FindSystemTimeZone();
|
|
|
|
|
2020-05-11 23:51:26 +02:00
|
|
|
} // namespace Common::TimeZone
|