Skip to content

Commit

Permalink
Merge pull request #627 from bcgov/2.0.8
Browse files Browse the repository at this point in the history
SB-429: converted latsUpdatedTimestamp to time zone unspecified
  • Loading branch information
bcgov-brwang authored Nov 19, 2024
2 parents bfa6eb5 + a29a056 commit 828e4bd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
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

0 comments on commit 828e4bd

Please sign in to comment.