Skip to content

[5.x] Cast entry dates to UTC#398

Closed
duncanmcclean wants to merge 5 commits intomasterfrom
utc-dates
Closed

[5.x] Cast entry dates to UTC#398
duncanmcclean wants to merge 5 commits intomasterfrom
utc-dates

Conversation

@duncanmcclean
Copy link
Member

@duncanmcclean duncanmcclean commented Feb 20, 2025

This pull request ensures that whenever a date is stored or retreived from the date column on the entries table, a UTC Carbon object will be returned.

Without our accessor, whenever the date attribute was accessed, the returned Carbon object would use the application's timezone, not UTC (which is what we want dates to be stored in instead).

Related: statamic/cms#11409

@jasonvarga jasonvarga changed the title Cast entry dates to UTC [5.x] Cast entry dates to UTC Feb 21, 2025
@duncanmcclean
Copy link
Member Author

Closing this as we've since changed our approach. Dates will continue to be saved in the app timezone, and only transformed to UTC when Statamic touches this.

@duncanmcclean duncanmcclean deleted the utc-dates branch March 18, 2025 16:40
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