pineapple-src/src/common/time_zone.h

24 lines
691 B
C
Raw Normal View History

2022-11-05 12:58:44 +00:00
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
2023-06-08 20:07:51 +00:00
#include <array>
2022-11-05 12:58:44 +00:00
#include <chrono>
#include <string>
namespace Common::TimeZone {
2023-06-08 20:07:51 +00:00
[[nodiscard]] const std::array<const char*, 46>& GetTimeZoneStrings();
2022-11-05 12:58:44 +00: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 20:07:51 +00:00
/// Searches time zone offsets for the closest offset to the system time zone
[[nodiscard]] std::string FindSystemTimeZone();
2022-11-05 12:58:44 +00:00
} // namespace Common::TimeZone