forked from suyu/suyu
tz_content_manager: Try the system time zone first
If we can't find the normal time zone string, try searching for the closest one.
This commit is contained in:
parent
3979c7daa4
commit
5d9dd88387
1 changed files with 9 additions and 2 deletions
|
@ -125,7 +125,14 @@ Result TimeZoneContentManager::GetTimeZoneInfoFile(const std::string& location_n
|
|||
|
||||
vfs_file = zoneinfo_dir->GetFileRelative(location_name);
|
||||
if (!vfs_file) {
|
||||
LOG_ERROR(Service_Time, "{:016X} has no file \"{}\"! Using default timezone.",
|
||||
LOG_WARNING(Service_Time, "{:016X} has no file \"{}\"! Using system timezone.",
|
||||
time_zone_binary_titleid, location_name);
|
||||
const std::string system_time_zone{Common::TimeZone::FindSystemTimeZone()};
|
||||
vfs_file = zoneinfo_dir->GetFile(system_time_zone);
|
||||
}
|
||||
|
||||
if (!vfs_file) {
|
||||
LOG_WARNING(Service_Time, "{:016X} has no file \"{}\"! Using default timezone.",
|
||||
time_zone_binary_titleid, location_name);
|
||||
vfs_file = zoneinfo_dir->GetFile(Common::TimeZone::GetDefaultTimeZone());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue