Skip to content

Commit

Permalink
Added "always" option to datetime fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Scheibling authored and scheibling committed Jun 7, 2023
1 parent 3c0dc09 commit 62c7e35
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sshkey_tools/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,9 @@ def parse_string_value(value: str) -> int:
if value == "forever":
return MAX_INT64 - 1

if value == "always":
return 1

return int((datetime.now() + str_to_time_delta(value)).timestamp())

@staticmethod
Expand Down

0 comments on commit 62c7e35

Please sign in to comment.