Skip to content

chore: use chrono::DateTime::from_timestamp in utc_now#128

Merged
piscisaureus merged 3 commits into
denoland:mainfrom
Akimotorakiyu:perf_from_timestamp
Jun 6, 2026
Merged

chore: use chrono::DateTime::from_timestamp in utc_now#128
piscisaureus merged 3 commits into
denoland:mainfrom
Akimotorakiyu:perf_from_timestamp

Conversation

@Akimotorakiyu

@Akimotorakiyu Akimotorakiyu commented Aug 2, 2025

Copy link
Copy Markdown
Contributor

NaiveDateTime::from_timestamp_opt is deprecated since chrono 0.4.35;
DateTime::from_timestamp replaces it directly and already returns
DateTime, removing the naive round-trip. Applies to the three
identical time.rs copies in proto, remote, and sqlite.

DateTime::from_timestamp already returns DateTime<Utc>; the
round-trip through naive_utc and from_naive_utc_and_offset is
unnecessary.
@piscisaureus piscisaureus changed the title perf: use chrono:DateTime::from_timestamp chore: use chrono::DateTime::from_timestamp in utc_now Jun 6, 2026
@piscisaureus piscisaureus mentioned this pull request Jun 6, 2026
5 tasks
@piscisaureus piscisaureus merged commit 05af62f into denoland:main Jun 6, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants