Attribute Macro test_with::timezone

source ยท
#[timezone]
Expand description

Run test case when the timezone is expected.

#[cfg(test)]
mod tests {

    // 0 means UTC
    #[test_with::timezone(0)]
    #[test]
    fn test_works() {
        assert!(true);
    }

    // +8 means GMT+8
    #[test_with::timezone(+8)]
    #[test]
    fn test_ignored() {
        panic!("should be ignored")
    }
}