[go: up one dir, main page]

time 0.2.4

Date and time library. Fully interoperable with the standard library. Mostly compatible with #![no_std].
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// seconds offset from UTC, positive is east
#[derive(serde::Serialize, serde::Deserialize)]
pub(crate) struct UtcOffset(i32);

impl From<crate::UtcOffset> for UtcOffset {
    #[inline]
    fn from(original: crate::UtcOffset) -> Self {
        Self(original.as_seconds())
    }
}

impl From<UtcOffset> for crate::UtcOffset {
    #[inline]
    fn from(original: UtcOffset) -> Self {
        Self::seconds(original.0)
    }
}