Mercurial > cgi-bin > hgweb.cgi > PassMan
changeset 29:bf78f7f9dad3 default tip
Fix timestamp-matching bug.
author | David Barts <n5jrn@me.com> |
---|---|
date | Mon, 30 Dec 2024 17:10:11 -0800 |
parents | 287eadf5ab30 |
children | |
files | src/main/kotlin/name/blackcap/passman/ListSubcommand.kt |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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") } }