Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
helgee committed Dec 3, 2024
1 parent 63af696 commit 90f5c00
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/lox-time/src/python/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl PyTime {
jd1: f64,
jd2: f64,
) -> PyResult<Self> {
let scale: PyTimeScale = scale.parse()?;
let scale: DynTimeScale = scale.parse()?;
Ok(Self(Time::from_two_part_julian_date(scale, jd1, jd2)?))
}

Expand All @@ -135,7 +135,7 @@ impl PyTime {
minute: u8,
seconds: f64,
) -> PyResult<PyTime> {
let scale: PyTimeScale = scale.parse()?;
let scale: DynTimeScale = scale.parse()?;
let time = Time::builder_with_scale(scale)
.with_doy(year, day)
.with_hms(hour, minute, seconds)
Expand Down
3 changes: 1 addition & 2 deletions crates/lox-time/src/utc/transformations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*/

use std::convert::Infallible;
use std::sync::OnceLock;

use crate::deltas::TimeDelta;
Expand Down Expand Up @@ -62,7 +61,7 @@ impl ToUtc for Utc {
impl ToUtc for Time<Tai> {
fn to_utc_with_provider(&self, provider: &impl LeapSecondsProvider) -> Result<Utc, UtcError> {
let delta = if self < tai_at_utc_1972_01_01() {
before1972::delta_tai_utc(self)
before1972::delta_tai_utc(*self)
} else {
provider.delta_tai_utc(*self)
}
Expand Down

0 comments on commit 90f5c00

Please sign in to comment.