# HG changeset patch # User David Barts # Date 1735607411 28800 # Node ID bf78f7f9dad3e6ac7d0d0a69a2efd7ace0a488e1 # Parent 287eadf5ab30cb1e661a0060721646a9f40afb40 Fix timestamp-matching bug. diff -r 287eadf5ab30 -r bf78f7f9dad3 src/main/kotlin/name/blackcap/passman/ListSubcommand.kt --- a/src/main/kotlin/name/blackcap/passman/ListSubcommand.kt Wed Jul 31 11:21:18 2024 -0700 +++ b/src/main/kotlin/name/blackcap/passman/ListSubcommand.kt Mon Dec 30 17:10:11 2024 -0800 @@ -111,9 +111,9 @@ matchers[it.name] = mutableListOf<(Any?) -> Boolean>() } when(op) { - '>' -> matchers[it.name]!! += { x -> x is Long && x > value } - '=' -> matchers[it.name]!! += { x -> x is Long && (x/1000L) == (value/1000L) } - '<' -> matchers[it.name]!! += { x -> x is Long && x < value } + '>' -> matchers[it.name]!! += { x -> x is java.util.Date && x.time > value } + '=' -> matchers[it.name]!! += { x -> x is java.util.Date && (x.time/1000L) == (value/1000L) } + '<' -> matchers[it.name]!! += { x -> x is java.util.Date && x.time < value } else -> throw RuntimeException("should never happen") } }