Skip to content

Having two UNIX_EPOCH constants is a potential source of confusion #52519

New issue

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

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

Already on GitHub? # to your account

Closed
ssokolow opened this issue Jul 19, 2018 · 1 comment
Closed

Having two UNIX_EPOCH constants is a potential source of confusion #52519

ssokolow opened this issue Jul 19, 2018 · 1 comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-enhancement Category: An issue proposing an enhancement or a PR with one. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@ssokolow
Copy link

While trying to get comfortable with SystemTime, I found myself extremely confused because it appeared that UNIX_EPOCH was usable, despite being marked unstable.

It wasn't until I checked bug #49502 that I finally realized what I'd repeatedly overlooked: What was being successfully used was std::time::UNIX_EPOCH rather than std::time::SystemTime::UNIX_EPOCH.

The simplest way to head off this kind of confusion would be to have the documentation for the two UNIX_EPOCH definitions mention each other's existence.

@jonas-schievink jonas-schievink added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label Jan 27, 2019
@jonas-schievink jonas-schievink added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Mar 6, 2020
@Dylan-DPC
Copy link
Member

the constant has stabilised now, and they have the same documentation so this is less of a problem now.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-enhancement Category: An issue proposing an enhancement or a PR with one. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants