Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1625 from DanielDent/patch-1
Browse files Browse the repository at this point in the history
Add support for durations in minutes
  • Loading branch information
erikjohnston committed Nov 12, 2016
2 parents 6cc4fcf + 1c93cd9 commit 0964005
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions synapse/config/_base.py
Expand Up @@ -64,11 +64,12 @@ def parse_duration(value):
if isinstance(value, int) or isinstance(value, long):
return value
second = 1000
hour = 60 * 60 * second
minute = 60 * second
hour = 60 * minute
day = 24 * hour
week = 7 * day
year = 365 * day
sizes = {"s": second, "h": hour, "d": day, "w": week, "y": year}
sizes = {"s": second, "m": minute, "h": hour, "d": day, "w": week, "y": year}
size = 1
suffix = value[-1]
if suffix in sizes:
Expand Down

0 comments on commit 0964005

Please sign in to comment.