Skip to content

Windows seems to lack nano Precision #38

@pinkforest

Description

@pinkforest

This seems like a standard library / windows target feature ?

https://github.com/pinkforest/humantime/actions/runs/5357555855/jobs/9718572323#step:4:96

I had to work/around it in multi-platform CI:

I sent a PR to add CI which replicates the feature which the above action is from:

I'll send a PR to gate the test

       // TODO: precision bug / feature in Windows side !?                                                                                                           
       // https://github.com/pinkforest/humantime/actions/runs/5357555855/jobs/9718572323#step:4:96                                                             
        #[cfg(not(target_os = "windows"))]
        assert_eq!(
            format_rfc3339_nanos(UNIX_EPOCH +
                Duration::new(1_518_563_312, 789_456_123)).to_string(),
            "2018-02-13T23:08:32.789456123Z");
        #[cfg(target_os = "windows")]
        assert_eq!(
            format_rfc3339_nanos(UNIX_EPOCH +
                Duration::new(1_518_563_312, 789_456_123)).to_string(),
            "2018-02-13T23:08:32.789456100Z");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions