Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

完全停止判断処理を修正 #1164

Merged
merged 1 commit into from
Oct 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Covid19Radar/Covid19Radar/Common/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ public static DateTime[] JstDateTimes(int days)
return dateTimes;
}

public static bool IsCurrentUICultureJaJp()
{
return "ja-JP".Equals(System.Globalization.CultureInfo.CurrentUICulture.Name);
}

#endregion

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class EndOfServiceNoticePageViewModel : ViewModelBase

private readonly ILoggerService _loggerService;

private readonly long FullStopDateTime = TimeZoneInfo.ConvertTime(new DateTime(2023, 4, 1, 0, 0, 0), AppConstants.TIMEZONE_JST).ToUnixEpoch();
private readonly long FullStopDateTime = TimeZoneInfo.ConvertTime(new DateTime(2022, 12, 31, 0, 0, 0), AppConstants.TIMEZONE_JST).ToUnixEpoch();

public EndOfServiceNoticePageViewModel(
INavigationService navigationService,
Expand All @@ -31,7 +31,7 @@ ILoggerService loggerService
{
_loggerService.StartMethod();

if (FullStopDateTime <= Utils.JstNow().ToUnixEpoch())
if (Utils.JstNow().ToUnixEpoch() <= FullStopDateTime && Utils.IsCurrentUICultureJaJp())
{
await NavigationService.NavigateAsync(nameof(SurveyRequestPage));
}
Expand Down