-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rename tm_gmtoff to tm_utcoff #18832
Conversation
Rename the tm_gmtoff field of time::Tm to tm_utcoff. Although GMT and UTC are commonly used interchangeably, UTC is more appropriate to denote the time standard. Python, for example, uses datetime.utcoffset() to represent the offset from UTC. [breaking-change]
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. |
7cb0772
to
7c64600
Compare
Oh, man, I'm not sure what's going on with this library. It's pretty crufty. Pinging some people who show up in git blame: cc @alexcrichton @erickt @seanmonstar @aturon. |
I'd love it if we could re-design the As regards this field, the implementation to adjust the gmtoffset is pretty slow as well. See #18725 |
@alexcrichton and I discussed this a bit on IRC, and agree that the best way forward is to move The only usages in rust itself are for wall-clock timings, which can be done through the @barosl @seanmonstar, if you're interested, take a look at https://mail.mozilla.org/pipermail/rust-dev/2014-July/010956.html for some initial thoughts about this kind of migration. @alexcrichton and I would be glad to help such a migration effort for |
Should we do this simple patch in the meantime? |
I'm actually going to prepare a PR to remove |
PR'd: #18858 |
@alexcrichton I made a pull request on time-rs/time#1. Should I close this? |
I'll go ahead, thanks @barosl! |
Rename the
tm_gmtoff
field oftime::Tm
totm_utcoff
.Although GMT and UTC are commonly used interchangeably, UTC is more appropriate to denote the time standard.
Python, for example, uses
datetime.utcoffset()
to represent the offset from UTC.I think we should fix this while we are allowed to break backward compatibility.