Skip to content

Conversation

AndyButland
Copy link
Contributor

This PR is for merging of the feature branch for the work we've been doing to make system dates more consistent in Umbraco into the main branch for Umbraco 17.

It contains the following PRs that have been independently reviewed and tested:

We should merge this following further QA on upgraded databases.

AndyButland and others added 3 commits July 30, 2025 11:21
* Updated persistence DTOs defining default dates to use UTC.

* Remove ForceToUtc = false from all persistence DTO attributes (default when not specified is true).

* Removed use of SpecifyKind setting dates to local.

* Removed unnecessary Utc suffixes on properties.

* Persist current date time with UtcNow.

* Removed further necessary Utc suffixes and fixed failing unit tests.

* Added migration for SQL server to update database date default constraints.

* Added comment justifying not providing a migration for SQLite default date constraints.

* Ensure UTC for datetimes created from persistence DTOs.

* Ensure UTC when creating dates for published content rendering in Razor and outputting in delivery API.

* Fixed migration SQL syntax.

* Introduced AuditItemFactory for creating entries for the backoffice document history, so we can control the UTC setting on the retrieved persisted dates.

* Ensured UTC dates are retrieved for document versions.

* Ensured UTC is returned for backoffice display of last edited and published for variant content.

* Fixed SQLite syntax for default current datetime.

* Apply suggestions from code review

Co-authored-by: Laura Neto <[email protected]>

* Further updates from code review.

---------

Co-authored-by: Laura Neto <[email protected]>
* Add settings for the migration.

* Add migration and implement for SQL server.

* Implement for SQLite.

* Fixes from testing with SQL Server.

* Fixes from testing with SQLite.

* Code tidy.

* Cleaned up usings.

* Removed audit log date from conversion.

* Removed webhook log date from conversion.
@Copilot Copilot AI review requested due to automatic review settings July 30, 2025 09:33
Copilot

This comment was marked as duplicate.

@AndyButland
Copy link
Contributor Author

AndyButland commented Aug 22, 2025

Merging this now further QA has been completed, on the detail of updates and verifying the migration runs on a large, real-world database. PRs into this feature branch have been approved.

@AndyButland AndyButland merged commit d623476 into v17/dev Aug 22, 2025
24 of 25 checks passed
@AndyButland AndyButland deleted the v17/feature/utc-system-dates branch August 22, 2025 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant