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

local time format error: rfc822 #16841

Closed
zengsai opened this issue Aug 29, 2014 · 2 comments
Closed

local time format error: rfc822 #16841

zengsai opened this issue Aug 29, 2014 · 2 comments

Comments

@zengsai
Copy link

zengsai commented Aug 29, 2014

Source Code:

extern crate time;

fn main() {
    let utc = time::now_utc();
    let local = time::now();

    println!("utc:   {}", utc.rfc822());
    println!("local: {}", local.rfc822());
}

Console Output:

utc:   Fri, 29 Aug 2014 08:05:12 GMT
local: Fri, 29 Aug 2014 16:05:12 strftime: can't understand this format Z

According to the document of this API, the correct output should be:

utc:   Fri, 29 Aug 2014 08:05:12 GMT
local: Fri, 29 Aug 2014 16:05:12 PST
@omasanori
Copy link
Contributor

Yes, you are correct. It occurs because %Z format specifier is not implemented in strftime for now. (see #2350)

@steveklabnik
Copy link
Member

This issue has been moved to the time repo: time-rs/time#64

bors added a commit to rust-lang-ci/rust that referenced this issue Mar 17, 2024
internal: Use assoc items as anchors for spans

This reduces the amount of macro call invalidations a bit
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

No branches or pull requests

3 participants