Skip to content

Commit

Permalink
fix: problem with index in the timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
algebraic-dev committed Nov 6, 2024
1 parent 35c014a commit d6e2024
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Std/Time/Zoned/ZoneRules.lean
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ If the timestamp falls between two transitions, it returns the most recent trans
def findTransitionIndexForTimestamp (transitions : Array Transition) (timestamp : Timestamp) : Option Nat :=
let value := timestamp.toSecondsSinceUnixEpoch
if let some idx := transitions.findIdx? (fun t => t.time.val ≥ value.val)
then some (idx - 1)
then some idx
else none

/--
Expand Down

0 comments on commit d6e2024

Please sign in to comment.