Ensure dates read from the database are treated as local when constructing entities (2) (#19013)

* Revert "Ensure dates read from the database are treated as local when constructing entities (#18989)"

This reverts commit 7b10d39d66.

* Avoid system dates stored with local server time being defaulted to UTC on database read.

* ContentScheduleDto.Date is UTC

---------

Co-authored-by: kjac <kja@umbraco.dk>
This commit is contained in:
Andy Butland
2025-04-14 10:55:36 +02:00
committed by GitHub
parent 7b10d39d66
commit f9496e8067
28 changed files with 65 additions and 99 deletions

View File

@@ -37,7 +37,7 @@ public class ContentVersionMeta
public int UserId { get; }
public DateTime VersionDate { get; private set; }
public DateTime VersionDate { get; }
public bool CurrentPublishedVersion { get; }
@@ -47,7 +47,5 @@ public class ContentVersionMeta
public string? Username { get; }
public void SpecifyVersionDateKind(DateTimeKind kind) => VersionDate = DateTime.SpecifyKind(VersionDate, kind);
public override string ToString() => $"ContentVersionMeta(versionId: {VersionId}, versionDate: {VersionDate:s}";
}