Use UTC for created_at in order to prevent diff noise when running models:update from a different timezone#631
Merged
Conversation
crmne
requested changes
Feb 27, 2026
Currently the model time is not normalised in UTC. This means that if someone tries to update models while being in a different timezone from the previous updater, all timestamps will be changed, leading to a lot of noise in the diff. Normalising to UTC guarantees the same output no matter which timezone the update is run in.
This is needed to make the parsing independent of system timezone. Without it, a date is parsed as midnight in the current system timezone so the date can change after converting to UTC. Both release_date and last_updated fields from models.dev are midnight. This is also a future proof change because, if models.dev was to start returning timestamps, Time.parse will parse the timestamp and ignore the appended "UTC midnight" string.
Previous commits modified to logic to save created_at as UTC. This was done to prevent random diff noise when people from different timezones run the update. This run is to convert all timestamps to UTC.
radanskoric
force-pushed
the
use-utc-model-timestamps
branch
from
February 27, 2026 14:17
fb11176 to
97c72f9
Compare
crmne
approved these changes
Feb 27, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #631 +/- ##
==========================================
+ Coverage 80.13% 80.88% +0.74%
==========================================
Files 113 113
Lines 5095 5096 +1
Branches 1307 1308 +1
==========================================
+ Hits 4083 4122 +39
+ Misses 1012 974 -38 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
The PR converts models info created_at field to use UTC time.
This will then prevent random diff noise when people from different timezones run the update.
Before, running the models update from a different timezone than the previous updater would change all timestamps to your timezone producing a very noisy diff.
The PR is composed of 4 commits that build on each other. They're separated for easier review with more details in commit descriptions:
Type of change
Scope check
Quality check
overcommit --installand all hooks pass[ ] For provider changes: Re-recorded VCR cassettes withbundle exec rake vcr:record[provider_name]bundle exec rspec[ ] I updated documentation if neededmodels.json,aliases.json)AI-generated code
API changes