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

Mark the date_time function from OffsetDateTime as public #673

Closed
samrg472 opened this issue Apr 4, 2024 · 1 comment
Closed

Mark the date_time function from OffsetDateTime as public #673

samrg472 opened this issue Apr 4, 2024 · 1 comment
Labels
C-duplicate Category: exact duplicate C-invalid Category: no issue exists or the issue cannot be reproduced

Comments

@samrg472
Copy link

samrg472 commented Apr 4, 2024

Hello,

At present, the best way to convert an OffsetDateTime to PrimitiveDateTime is to use the new function and construct it from parts. If OffsetDateTime::date_time was public, the conversion below wouldn't be necessary.

I use PrimitiveDateTime for database storage where columns are typically stored without a timezone for UTC.

let now = OffsetDateTime::now_utc();
let primitive = PrimitiveDateTime::new(now.date(), now.time());
@jhpratt
Copy link
Member

jhpratt commented Apr 4, 2024

#369
#390
#395
#454
#458
#553
#658

@jhpratt jhpratt closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2024
@jhpratt jhpratt added C-duplicate Category: exact duplicate C-invalid Category: no issue exists or the issue cannot be reproduced labels Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-duplicate Category: exact duplicate C-invalid Category: no issue exists or the issue cannot be reproduced
Projects
None yet
Development

No branches or pull requests

2 participants