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

TzDateTime enhancements #1473 #1484

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

hkalexling
Copy link
Contributor

Closes #1473

Added

  • datetime::from_date_tz and datetime::from_time_tz: similar to from_date and from_time, but allow additional timezone information and return TzDateTime
  • DateTime.with_gmt_offset and TzDateTime.with_gmt_offset: update timestamp to the provided offset while keeping the date and time values unchanged
  • DateTime.to_gmt_offset and TzDateTime.to_gmt_offset: update the date and time values to the provided offset while keeping the timestamp unchanged
  • TzDateTime.add_* methods: works like the DateTime counterparts but timezone aware

Also included unit tests for the new functions

@lerno
Copy link
Collaborator

lerno commented Sep 26, 2024

Can you add a line in the release notes as well?

@hkalexling
Copy link
Contributor Author

@lerno
Copy link
Collaborator

lerno commented Sep 26, 2024

Oh, sorry, I didn't see it for some reason!

@lerno lerno merged commit 4cdea86 into c3lang:master Sep 26, 2024
27 checks passed
@lerno
Copy link
Collaborator

lerno commented Sep 26, 2024

Thank you!

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.

Suggestions for TzDateTime Enhancements
2 participants