summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/time/time_zone_content_manager.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/hle/service/time/time_zone_content_manager.cpp b/src/core/hle/service/time/time_zone_content_manager.cpp
index afbfe9715..ae41116b6 100644
--- a/src/core/hle/service/time/time_zone_content_manager.cpp
+++ b/src/core/hle/service/time/time_zone_content_manager.cpp
@@ -1,6 +1,7 @@
1// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project 1// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later 2// SPDX-License-Identifier: GPL-2.0-or-later
3 3
4#include <chrono>
4#include <sstream> 5#include <sstream>
5 6
6#include "common/logging/log.h" 7#include "common/logging/log.h"
@@ -12,7 +13,11 @@
12#include "core/file_sys/registered_cache.h" 13#include "core/file_sys/registered_cache.h"
13#include "core/file_sys/romfs.h" 14#include "core/file_sys/romfs.h"
14#include "core/file_sys/system_archive/system_archive.h" 15#include "core/file_sys/system_archive/system_archive.h"
16#include "core/file_sys/vfs.h"
17#include "core/file_sys/vfs_types.h"
18#include "core/hle/result.h"
15#include "core/hle/service/filesystem/filesystem.h" 19#include "core/hle/service/filesystem/filesystem.h"
20#include "core/hle/service/time/errors.h"
16#include "core/hle/service/time/time_manager.h" 21#include "core/hle/service/time/time_manager.h"
17#include "core/hle/service/time/time_zone_content_manager.h" 22#include "core/hle/service/time/time_zone_content_manager.h"
18 23
@@ -73,7 +78,12 @@ TimeZoneContentManager::TimeZoneContentManager(Core::System& system_)
73void TimeZoneContentManager::Initialize(TimeManager& time_manager) { 78void TimeZoneContentManager::Initialize(TimeManager& time_manager) {
74 std::string location_name; 79 std::string location_name;
75 const auto timezone_setting = Settings::GetTimeZoneString(); 80 const auto timezone_setting = Settings::GetTimeZoneString();
76 if (timezone_setting == "auto" || timezone_setting == "default") { 81 if (timezone_setting == "auto") {
82 const struct std::chrono::tzdb& time_zone_data = std::chrono::get_tzdb();
83 const std::chrono::time_zone* current_zone = time_zone_data.current_zone();
84 std::string_view current_zone_name = current_zone->name();
85 location_name = current_zone_name;
86 } else if (timezone_setting == "default") {
77 location_name = Common::TimeZone::GetDefaultTimeZone(); 87 location_name = Common::TimeZone::GetDefaultTimeZone();
78 } else { 88 } else {
79 location_name = timezone_setting; 89 location_name = timezone_setting;