Skip to content

Commit

Permalink
Fix typing for polls with relative expiry times (goonstation#18389)
Browse files Browse the repository at this point in the history
  • Loading branch information
mordent-goonstation authored Apr 3, 2024
1 parent c0343c1 commit 638c0ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/modules/polling/poll_editor_panel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@
if ("never")
return null
if ("minutes")
return toIso8601(addTime(subtractTime(world.realtime, hours = world.timezone), minutes = value))
return toIso8601(addTime(subtractTime(world.realtime, hours = world.timezone), minutes = text2num(value)))
if ("hours")
return toIso8601(addTime(subtractTime(world.realtime, hours = world.timezone), hours = value))
return toIso8601(addTime(subtractTime(world.realtime, hours = world.timezone), hours = text2num(value)))
if ("days")
return toIso8601(addTime(subtractTime(world.realtime, hours = world.timezone), days = value))
return toIso8601(addTime(subtractTime(world.realtime, hours = world.timezone), days = text2num(value)))
if ("timestamp")
if (validateIso8601(value))
return value
Expand Down

0 comments on commit 638c0ff

Please sign in to comment.