diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/timestamp/driver.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/timestamp/driver.cxx b/tests/timestamp/driver.cxx index 1746c2e..11e1821 100644 --- a/tests/timestamp/driver.cxx +++ b/tests/timestamp/driver.cxx @@ -225,4 +225,16 @@ main () assert (parse ( "Apr 8 19:31:10 2016", "%b %d %H:%M:%S %Y", "Apr 08 19:31:10 2016")); + + { + timestamp t (from_string ("Apr 8 19:31:10 2016", + "%b %d %H:%M:%S %Y", + true /* local */)); + + timestamp mt (from_string ("Apr 8 00:00:00 2016", + "%b %d %H:%M:%S %Y", + true /* local */)); + + assert (daytime (t) == t - mt); + } } |