Skip to content

Commit

Permalink
enforced CultureInfo("en-GB") on date tostring in establishment builder
Browse files Browse the repository at this point in the history
  • Loading branch information
paullocknimble committed Nov 23, 2023
1 parent 5490067 commit ef1679a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dfe.Academies.Application/Builders/EstablishmentDtoBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Dfe.Academies.Contracts.V4.Establishments;
using Dfe.Academies.Domain.Census;
using System;
using System.Globalization;

namespace Dfe.Academies.Application.Builders
{
Expand All @@ -14,7 +15,7 @@ public EstablishmentDtoBuilder WithBasicDetails(Domain.Establishment.Establishme
_dto.Ukprn = establishment?.UKPRN;
_dto.NoOfBoys = establishment?.NumberOfBoys.ToString();
_dto.NoOfGirls = establishment?.NumberOfGirls.ToString();
_dto.GiasLastChangedDate = establishment?.GiasLastChangedDate.ToString();
_dto.GiasLastChangedDate = establishment?.GiasLastChangedDate?.ToString(new CultureInfo("en-GB"));
_dto.ReligousEthos = establishment?.ReligiousEthos;
_dto.SenUnitCapacity = establishment?.SenUnitCapacity.ToString();
_dto.SenUnitOnRoll = establishment?.SenUnitOnRoll.ToString();
Expand Down Expand Up @@ -149,8 +150,8 @@ public EstablishmentDtoBuilder WithMISEstablishment(Domain.Establishment.Establi
{
_dto.MISEstablishment = new MisEstablishmentDto
{
DateOfLatestSection8Inspection = establishment?.DateOfLatestShortInspection?.ToString(),
InspectionEndDate = establishment?.InspectionEndDate?.ToString(),
DateOfLatestSection8Inspection = establishment?.DateOfLatestShortInspection?.ToString(new CultureInfo("en-GB")),
InspectionEndDate = establishment?.InspectionEndDate?.ToString(new CultureInfo("en-GB")),
OverallEffectiveness = establishment?.OverallEffectiveness?.ToString(),
QualityOfEducation = establishment?.QualityOfEducation?.ToString(),
BehaviourAndAttitudes = establishment?.BehaviourAndAttitudes?.ToString(),
Expand Down

0 comments on commit ef1679a

Please sign in to comment.