pineapple-src/src/common/time_zone.h

24 lines
691 B
C
Raw Normal View History

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