Skip to content

local time format error: rfc822 #16841

Closed
Closed
@zengsai

Description

@zengsai

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions