Skip to content

Add CI#4

Merged
pinkforest merged 5 commits intomainfrom
chore-add-ci
Jun 23, 2023
Merged

Add CI#4
pinkforest merged 5 commits intomainfrom
chore-add-ci

Conversation

@pinkforest
Copy link

@pinkforest pinkforest commented Jun 23, 2023

Windows side seems to have problems with nanos Precision ...

https://github.com/cyborg-rs/cyborgtime/actions/runs/5357328059/jobs/9718041387?pr=4#step:4:85

.. now is this a standard library feature or some target oddity ?

This "works" but it's "broken":

pub fn format_rfc3339_nanos(system_time: SystemTime) -> Rfc3339Timestamp {
    Rfc3339Timestamp(system_time, Precision::Nanos)
}

       // TODO: precision bug / feature in Windows side !?                                                                                                           
        // https://github.com/cyborg-rs/cyborgtime/actions/runs/5357328059/jobs/9718041387?pr=4#step:4:85                                                             
        #[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

Successfully merging this pull request may close these issues.

1 participant