From 69ac314115df1b75207b61587f8e93851c244a29 Mon Sep 17 00:00:00 2001 From: cocoa-dev003 <66989607+cocoa-dev003@users.noreply.github.com> Date: Thu, 20 Oct 2022 12:13:20 +0900 Subject: [PATCH 1/2] Fixed to use SURVEY_END_DATE_UTC of AppCpnstants --- .../EndOfService/EndOfServiceNoticePageViewModel.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Covid19Radar/Covid19Radar/ViewModels/EndOfService/EndOfServiceNoticePageViewModel.cs b/Covid19Radar/Covid19Radar/ViewModels/EndOfService/EndOfServiceNoticePageViewModel.cs index 88905f347..1a05afc22 100644 --- a/Covid19Radar/Covid19Radar/ViewModels/EndOfService/EndOfServiceNoticePageViewModel.cs +++ b/Covid19Radar/Covid19Radar/ViewModels/EndOfService/EndOfServiceNoticePageViewModel.cs @@ -18,8 +18,6 @@ public class EndOfServiceNoticePageViewModel : ViewModelBase private readonly ILoggerService _loggerService; - private readonly long FullStopDateTime = TimeZoneInfo.ConvertTime(new DateTime(2022, 12, 31, 0, 0, 0), AppConstants.TIMEZONE_JST).ToUnixEpoch(); - public EndOfServiceNoticePageViewModel( INavigationService navigationService, ILoggerService loggerService @@ -41,7 +39,7 @@ ILoggerService loggerService { _loggerService.StartMethod(); - if (Utils.JstNow().ToUnixEpoch() <= FullStopDateTime && Utils.IsCurrentUICultureJaJp()) + if (Utils.JstNow().ToUnixEpoch() <= AppConstants.SURVEY_END_DATE_UTC.ToUnixEpoch() && Utils.IsCurrentUICultureJaJp()) { await NavigationService.NavigateAsync(nameof(SurveyRequestPage)); } From 40b733970741b659a9d8bb061b38e1020ce06fc1 Mon Sep 17 00:00:00 2001 From: cocoa-dev003 <66989607+cocoa-dev003@users.noreply.github.com> Date: Thu, 20 Oct 2022 12:34:01 +0900 Subject: [PATCH 2/2] Fixed to compare in UTC --- .../ViewModels/EndOfService/EndOfServiceNoticePageViewModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Covid19Radar/Covid19Radar/ViewModels/EndOfService/EndOfServiceNoticePageViewModel.cs b/Covid19Radar/Covid19Radar/ViewModels/EndOfService/EndOfServiceNoticePageViewModel.cs index 1a05afc22..1efafe2f5 100644 --- a/Covid19Radar/Covid19Radar/ViewModels/EndOfService/EndOfServiceNoticePageViewModel.cs +++ b/Covid19Radar/Covid19Radar/ViewModels/EndOfService/EndOfServiceNoticePageViewModel.cs @@ -39,7 +39,7 @@ ILoggerService loggerService { _loggerService.StartMethod(); - if (Utils.JstNow().ToUnixEpoch() <= AppConstants.SURVEY_END_DATE_UTC.ToUnixEpoch() && Utils.IsCurrentUICultureJaJp()) + if (DateTime.UtcNow.ToUnixEpoch() <= AppConstants.SURVEY_END_DATE_UTC.ToUnixEpoch() && Utils.IsCurrentUICultureJaJp()) { await NavigationService.NavigateAsync(nameof(SurveyRequestPage)); }