Having two UNIX_EPOCH constants is a potential source of confusion #52519
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.
While trying to get comfortable with
SystemTime
, I found myself extremely confused because it appeared thatUNIX_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 thanstd::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.The text was updated successfully, but these errors were encountered: