Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DateTime::to_utc #1325

Merged
merged 1 commit into from
Sep 27, 2023
Merged

Add DateTime::to_utc #1325

merged 1 commit into from
Sep 27, 2023

Conversation

pitdicker
Copy link
Collaborator

To have an easy way to convert any DateTime<Tz> to DateTime<Utc>.

As discussed in #1318.

@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

Merging #1325 (5383737) into 0.4.x (0032431) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##            0.4.x    #1325   +/-   ##
=======================================
  Coverage   91.25%   91.26%           
=======================================
  Files          38       38           
  Lines       17164    17174   +10     
=======================================
+ Hits        15663    15673   +10     
  Misses       1501     1501           
Files Coverage Δ
src/datetime/mod.rs 85.03% <100.00%> (+0.06%) ⬆️
src/datetime/tests.rs 96.52% <100.00%> (+0.01%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@djc
Copy link
Contributor

djc commented Sep 27, 2023

In my mind the proposed behavior was to adjust the DateTime for the offset, not to just discard the offset.

@pitdicker
Copy link
Collaborator Author

The value is already stored in UTC, so it does nothing special compared to into().

@pitdicker pitdicker merged commit 068b4bd into chronotope:0.4.x Sep 27, 2023
37 checks passed
@pitdicker pitdicker deleted the to_utc branch September 27, 2023 09:08
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.

None yet

2 participants