diff options
| author | Botahamec <botahamec@outlook.com> | 2022-03-21 10:18:46 -0400 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2022-03-21 10:18:46 -0400 |
| commit | d4774180011119a00fce909e1102f45ef3a27c2c (patch) | |
| tree | 41da7c4afc689546201e3cda0331119e9e8118a3 /src/timezone.rs | |
| parent | db9f20681f90f206d393d2b06a6a8401515ff562 (diff) | |
Convert DateTime to TAI timestamp
Diffstat (limited to 'src/timezone.rs')
| -rw-r--r-- | src/timezone.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/timezone.rs b/src/timezone.rs index 6f356ca..f0096c6 100644 --- a/src/timezone.rs +++ b/src/timezone.rs @@ -52,8 +52,8 @@ impl UtcOffset { pub const UTC: Self = Self { offset_seconds: 0 }; /// Makes a new `UtcOffset` timezone with the given timezone difference. - /// A positive number is the Eastern hemisphere. A negative number is the - /// Western hemisphere. + /// A positive number is the Eastern hemisphere. A negative number behind + /// UTC, such as UTC-5. #[must_use] pub const fn from_seconds(seconds: i32) -> Self { Self { @@ -62,22 +62,22 @@ impl UtcOffset { } /// Makes a new `UtcOffset` timezone with the given timezone difference. - /// A positive number is the Eastern hemisphere. A negative number is the - /// Western hemisphere. + /// A positive number is the Eastern hemisphere. A negative number is + /// behind UTC, such as UTC-5. #[must_use] pub const fn from_hours(hours: i32) -> Self { Self::from_seconds(hours * 3600) } /// The number of hours this timezone is ahead of UTC. This number is - /// negative if the timezone is in the Western hemisphere + /// negative if the timezone is behind UTC, such as UTC-5. #[must_use] pub fn hours_ahead(self) -> f32 { self.offset_seconds as f32 / 3600.0 } /// The number of seconds this timezone is ahead of UTC. This number is - /// negative if the timezone is in the Western hemisphere + /// negative if the timezone is behind UTC, such as UTC-5. #[must_use] pub const fn seconds_ahead(self) -> i32 { self.offset_seconds |
