Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-04-06 11:05:27 -0400
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-09-11 09:30:53 -0400
commit1254141c0f4792e1433109550d888383e44dedec (patch)
tree611fb062e908d19a1a93c7096e0c2b3df3894c74
parent247ade8f1ac575b86075c5b16c0e45e590de312e (diff)
downloadtame-1254141c0f4792e1433109550d888383e44dedec.tar.gz
tame-1254141c0f4792e1433109550d888383e44dedec.tar.bz2
tame-1254141c0f4792e1433109550d888383e44dedec.zip
datetime: Assert on non-empty timestamp_current
This won't be a problem in practice if nothing imports the package, so existing systems won't be affected. * datetime.xml: New assertion for timestamp_current.
-rw-r--r--core/datetime.xml15
1 files changed, 12 insertions, 3 deletions
diff --git a/core/datetime.xml b/core/datetime.xml
index b27e771..76d0bb3 100644
--- a/core/datetime.xml
+++ b/core/datetime.xml
@@ -18,12 +18,16 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<package xmlns="http://www.lovullo.com/rater"
- xmlns:c="http://www.lovullo.com/calc"
- core="true"
- desc="Date and time">
+ xmlns:t="http://www.lovullo.com/rater/apply-template"
+ xmlns:c="http://www.lovullo.com/calc"
+ core="true"
+ desc="Date and time">
<import package="base" />
+ <import package="assert" />
+ <import package="vector/cmatch" />
+
Providing the current timestamp externally allows the system to be
wholly deterministic.
@@ -35,6 +39,11 @@
desc="Unix timestamp representing the current time of the
system (clock time), as it should be perceived" />
+ <t:assert failure="Missing Unix timestamp for timestamp_current">
+ <t:match-gt on="timestamp_current" value="ZERO" />
+ </t:assert>
+
+
This system does not handle its own arthiemtic to figure out the
current date components from the given timestamp.