Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SB-429: converted latsUpdatedTimestamp to time zone unspecified #627

Merged
merged 2 commits into from
Nov 19, 2024
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
4 changes: 4 additions & 0 deletions Server/SchoolBusAPI/Hangfire/CcwJobService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ public async Task UpdateCCWJob()
bus.LicencePlateNumber = cCWData.ICBCLicencePlateNumber;
}

// SB-429
DateTime convertedLastUpdatedTimestamp = DateTime.SpecifyKind(bus.CCWData.LastUpdateTimestamp, DateTimeKind.Unspecified);
bus.CCWData.LastUpdateTimestamp = convertedLastUpdatedTimestamp;

_context.SaveChanges();
Log.Information($"[Hangfire] UpdateCCWJob - Saved bus record with the ID {data.Id}.");
}
Expand Down
2 changes: 1 addition & 1 deletion Server/SchoolBusAPI/SchoolBusAPI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Company>Ministry of Transportation and Infrastructure</Company>
<Description>The API server for the schoolbus inspection application.</Description>
<Copyright>Copyright© 2017, Province of British Columbia.</Copyright>
<Version>2.0.7</Version>
<Version>2.0.8</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
4 changes: 4 additions & 0 deletions Server/SchoolBusAPI/Services/CCWNotificationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,15 @@ public List<CCWNotificationViewModel> GetNotifications(DateTime dateFrom, DateTi

dateFrom = DateUtils.ConvertPacificToUtcTime(
new DateTime(dateFrom.Year, dateFrom.Month, dateFrom.Day, 0, 0, 0));
dateFrom = DateTime.SpecifyKind(dateFrom, DateTimeKind.Unspecified);



dateTo = DateUtils.ConvertPacificToUtcTime(
new DateTime(dateTo.Year, dateTo.Month, dateTo.Day, 0, 0, 0))
.AddDays(1)
.AddSeconds(-1);
dateTo = DateTime.SpecifyKind(dateTo, DateTimeKind.Unspecified);

var notifications = data.SelectMany(x => x.CCWNotifications)
.Include(x => x.CCWNotificationDetails)
Expand Down
2 changes: 1 addition & 1 deletion Server/SchoolBusCommon/VersionInfoExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static ApplicationVersionInfo GetApplicationVersionInfo(this Assembly ass
Description = assembly.GetCustomAttribute<AssemblyDescriptionAttribute>().Description,
FileVersion = assembly.GetCustomAttribute<AssemblyFileVersionAttribute>().Version,
FileCreationTime = creationTime.ToString("O"), // Use the round trip format as it includes the time zone.
InformationalVersion = assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion,
InformationalVersion = assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion.Split('+')[0],
TargetFramework = assembly.GetCustomAttribute<TargetFrameworkAttribute>().FrameworkName,
Title = assembly.GetCustomAttribute<AssemblyTitleAttribute>().Title,
ImageRuntimeVersion = assembly.ImageRuntimeVersion,
Expand Down
Loading