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

Windows seems to lack nano Precision #38

Open
pinkforest opened this issue Jun 23, 2023 · 0 comments
Open

Windows seems to lack nano Precision #38

pinkforest opened this issue Jun 23, 2023 · 0 comments

Comments

@pinkforest
Copy link

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");
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

1 participant