aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authordrh <>2025-01-21 17:37:58 +0000
committerdrh <>2025-01-21 17:37:58 +0000
commit255548562b125e6c148bb27d49aaa01b2fe61dba (patch)
tree7fa27a5ea65dc7c683b6955e5dc32beac74f031d /test
parent8e7a16895c62f8c56e8ada82cecdacaf1e97fcd3 (diff)
downloadsqlite-255548562b125e6c148bb27d49aaa01b2fe61dba.tar.gz
sqlite-255548562b125e6c148bb27d49aaa01b2fe61dba.zip
Fix date/time computations to deal with the sub-millisecond rounding
problem identified in [forum:/forumpost/766a2c9231|forum post 766a2c9231]. FossilOrigin-Name: afb0a5923a6db4045fab5226198aab970d746d4866294ebba943c6986e97ecde
Diffstat (limited to 'test')
-rw-r--r--test/date.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/date.test b/test/date.test
index d22b652b4..2042880a9 100644
--- a/test/date.test
+++ b/test/date.test
@@ -651,5 +651,13 @@ datetest 19.51 {date('2000-08-31','+0022-06-00','floor')} {2023-02-28}
datetest 19.52 {date('2000-08-31','+0023-06-00','ceiling')} {2024-03-02}
datetest 19.53 {date('2000-08-31','+0022-06-00','ceiling')} {2023-03-03}
+# 2025-01-21
+# https://sqlite.org/forum/forumpost/766a2c9231
+#
+datetest 20.1 {datetime('2024-12-31 23:59:59.9990')} {2024-12-31 23:59:59}
+datetest 20.2 {datetime('2024-12-31 23:59:59.9999999999999')} \
+ {2024-12-31 23:59:59}
+datetest 20.3 {datetime('2024-12-31 23:59:59.9995')} {2024-12-31 23:59:59}
+datetest 20.4 {datetime('2024-12-31 23:59:58.9995')} {2024-12-31 23:59:58}
finish_test