aboutsummaryrefslogtreecommitdiff
path: root/scripts/rpki/sundial.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2008-01-26 02:46:31 +0000
committerRob Austein <sra@hactrn.net>2008-01-26 02:46:31 +0000
commit692a976a5197930ee0c9e0b5dec6f9c3bb721456 (patch)
treeeb89952b0704da2e4bd28ddd70aad189ea44177b /scripts/rpki/sundial.py
parentc73cea1829135747bc3331b663cd4460e81538b7 (diff)
Implement "rekey" and "revoke" left-right controls
svn path=/scripts/manifests.py; revision=1509
Diffstat (limited to 'scripts/rpki/sundial.py')
-rw-r--r--scripts/rpki/sundial.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/rpki/sundial.py b/scripts/rpki/sundial.py
index c8e977c6..0703ff22 100644
--- a/scripts/rpki/sundial.py
+++ b/scripts/rpki/sundial.py
@@ -105,6 +105,14 @@ class datetime(pydatetime.datetime):
"""Convert to SQL storage format."""
return self
+ def later(self, other):
+ """Return the later of two timestamps."""
+ return other if other > self else self
+
+ def earlier(self, other):
+ """Return the earlier of two timestamps."""
+ return other if other < self else self
+
# Alias to simplify imports for callers
timedelta = pydatetime.timedelta