aboutsummaryrefslogtreecommitdiff
path: root/test/date.test
AgeCommit message (Collapse)AuthorLines
13 daysFix a date/time test involving timezones that was not working on Windows.drh-2/+2
FossilOrigin-Name: 62e99c1336913e3f47347d9a47473a01393ecb0fecfa79a9c9ef96797d068b78
13 daysThe 'utc' time modifier should not cancel 'subsec'.drh-0/+2
[bugs:/info/2026-11-05T22:11:32Z|Bug 2026-11-05T22:11:32Z] FossilOrigin-Name: 2d7042c18ca995b46bb5731d7f8e2a02c94b3b1317f71269f026fae0c87c8ad8
2026-11-10Do not allow timezones on a HH:MM:SS offset modifier.drh-17/+0
FossilOrigin-Name: 4b7348afb403010f83bea71d76721b5c8322f577f1166f3aeccc2a8c488c23fb
2026-11-10Clean up excess commentary in the initial prototype fix.drh-3/+0
FossilOrigin-Name: 80e3541043bef35781b873efcc379e947f0d7c666c8cbe1e84ad22338914bf7c
2026-11-07Experimental AI-assisted proof of concept for date modifier reports ↵karl-0/+107
7757ac1132, 3cc3a0207e, e0fe679e7c. Claude Opus 5.5 high candidate; Gemini 4 Argon high review; Codex fleet supervisor validation. Based on trunk 9a42b5817055e6ad. Maintainer review required. FossilOrigin-Name: 82ba76b277e3ff6926d5f5ea365aca3f942da07cdef3bfd75906ef25638ec736
2026-10-17Fix 24:00:00 rounding of dates with negative years.drh-0/+2
[forum:/info/2026-10-17T12:57:32Z|Forum post 2026-10-17T12:57:32Z] FossilOrigin-Name: 91515aa82e05f32db4b5d126d762d730cf424735edc4ef59a696ad581f4ca1ab
2026-10-15Fixes to the handling of time 24:00:00.drh-1/+6
[forum:/info/2026-10-15T10:26:06Z|Forum post 2026-10-15T10:26:06Z] FossilOrigin-Name: 69071e25cad52b7fe15749f5fb969e847f9cd65e66341e8d1d4e5f5282283cd4
2026-09-24In date/time functions, the hour can be 24 as long as the minutes anddrh-0/+24
seconds are zero. [bugs:/info/2026-09-23T02:44:48Z|Bug 2026-09-23T02:44:48Z] FossilOrigin-Name: 52eec02592f9d0d2d4282c20cc0872215c8d88e17f1a3e34d2ccab48119f7c42
2026-07-01Add "end of day/month/year" modifiers to date/time functions.drh-2/+46
FossilOrigin-Name: 2c4cb3223c6c56d05fe91b8d19b60eac26a274e41f34a2d8f2cf911927581932
2026-07-01Enhance the "weekday N" modifier for date/time functions such that ifdrh-11/+25
the argument is negative, it move the date backwards in time to the matching weekday, rather than forwards. FossilOrigin-Name: e31bea6ce188fb3ae2d8da132a40a182431d701dc6b991af470337a1cdd3f8e4
2025-09-17In the date/time functions, a timezone suffix of "+00:00" should workdrh-1/+21
the same as "Z". [forum:/forumpost/2025-09-17T10:12:14z|Forum post 2025-09-17T10:12:14z]. FossilOrigin-Name: 3b7a5babf0843c4b3ce93d26f1447218585ce645ec3acd942ac649204e16675a
2025-04-10Remove unnecessary "www." prefixes on domain names in URLs.drh-1/+1
FossilOrigin-Name: 20acd630b91609725794ce84f9eda01d5f3c898407f0948264830851d25ccaa6
2025-01-21Fix date/time computations to deal with the sub-millisecond roundingdrh-0/+8
problem identified in [forum:/forumpost/766a2c9231|forum post 766a2c9231]. FossilOrigin-Name: afb0a5923a6db4045fab5226198aab970d746d4866294ebba943c6986e97ecde
2024-03-04Adjust date/time functions so that they do a better job of keeping trackdrh-1/+33
of whether the current time is UTC or localtime, and no-op the 'utc' and 'localtime' modifiers accordingly. See [forum:/info/e7a939e074|forum post e7a939e074]. Also add the datedebug() function, available only under -DSQLITE_DEBUG, for improved visibility of the DateTime object during debugging and testing. FossilOrigin-Name: dc569683748354a6db83438904422e802d3ea780775c48da85b474fff03ca8a1
2024-03-03Back out the previous change. Replace it with new date modifiers "ceiling"drh-9/+47
and "floor". FossilOrigin-Name: f0831cced2c919e409214d936c81473ae321a98c5bd78b5b729c1269bf71bc45
2024-03-02Change the magic time-interval names that do truncate-to-same-month to bedrh-0/+9
"mnth" and "yr" - "month" and "year" without the vowels. FossilOrigin-Name: 296b46c529d79385d7f4db2c789254a992c01ff66fe8ba6d3a3ce4aaac0203fb
2024-01-18Add support in the strftime() SQL function for conversion letters %G, %g,drh-2/+2
%U, and %V. FossilOrigin-Name: e1155d6aa4b960ecfd14fa3467f28672af3327699c547f5b9e75da3ac1348ff7
2023-11-04Ensure that the YYYY-MM-DD input to date and time functions has been normalizeddrh-0/+5
prior to returning a result. [forum:/forumpost/6bb476897e|Forum post 6bb476897e]. FossilOrigin-Name: b692eb8ccb2d0645599ad73a8bdacf5df499114244aadeb38aabc580fc4dc7c5
2023-08-29New conversion letters added to strftime(): %e, %k, %I, %l, %R, %P, %p, %T, %u.drh-3/+21
FossilOrigin-Name: 058722b2d0b995195a8ce3effe9722ae1c18cb1e7a520b481030da0bd579fe41
2023-05-04Add some tests of subsecond modifier for date/time functions. Sync with trunk.larrybr-0/+6
FossilOrigin-Name: 6499ebff545e663198bd0534be205a4e9ca68c7fb20fdcfa54fae4d9b79bfe3a
2023-02-08Back out the 'txn' enhancement to date/time functions. The duration of adrh-76/+11
"transaction" is confused and needs to be straightened out prior to moving forward with this change. FossilOrigin-Name: 4a145f07322d768a07619bed27e0390d50f3a01d07787b9296234a5ceb6f1218
2023-02-08Test cases to show that CURRENT_TIMESTAMP and similar hold the same valuedrh-2/+23
across a transaction. FossilOrigin-Name: 7b2fa20e31b8a0314b9ccb97bb556898d552505dbc5943f248df3f86c0f4e008
2023-02-07Simplify the code and add test cases.drh-11/+55
FossilOrigin-Name: d3bed4caff561e71c396cc869c5b4d9bf216ba203485e738c12ec62741f1aba5
2022-03-05Fix the 'localtime' modifier in date/time functions so that it preservesdrh-1/+4
fractional seconds. [forum:/forumpost/2ffbaa2c3fd7fb82|Forum post 2ffbaa2c3fd7fb82]. FossilOrigin-Name: 1c875b0764ab00e95c92f0ee329659e88041763e125c2891201d80f68c41f717
2022-02-11Use the enhanced SQLITE_TESTCTRL_LOCALTIME_FAULT (2) capability to do betterdrh-120/+52
testing of the 'localtime' and 'utc' modifiers to date/time functions. FossilOrigin-Name: f38071946ac2e5bb61e6c0620507e4c94464999ac700d86c1a704b94eb1c009a
2022-02-10Performance improve to the 'localtime' and 'utc' modifiers for date/timedrh-7/+7
functions. FossilOrigin-Name: 85cb6014751a0572d28ebd839331d5d7a78de45c9e522adcd834a8a85746f32e
2017-03-03Fix another corner-case for the 'start of ...' modifier in the date/timedrh-0/+2
functions. Related to ticket [6097cb92745327a1]. FossilOrigin-Name: 8831f4393dda42b3434e7767968caea84bbca2af
2017-03-02Fix a bug in the 'start of ...' date/time modifiers when they follow adrh-0/+10
julian day number. Fix for ticket [6097cb92745327a1]. FossilOrigin-Name: 081dbcfb6d82528cefecb36c4491fa6e1a790b17
2016-11-30Further changes to the date/time functions to suppress harmless signeddrh-1/+48
integer overflow warnings that could have occurred when doing out-of-range date calculations which, according to the docs, give undefined results. FossilOrigin-Name: dc453b3403450b1d8cc53daf0721fed025b9053c
2016-11-29The documentation says that the built-in date-time functions give undefineddrh-12/+2
results for dates before 0000-01-01 and after 9999-12-31. Change the actually implementation so that the answer given is really NULL. This also avoids unnecessary hand-wringing over an signed integer overflow that might otherwise occur when processing out-of-bound dates. FossilOrigin-Name: d410a839752153c6d8be08f758abfbc16475745a
2015-12-23Enhance the 'utc' modifier on date/time functions so that if the LHS isdrh-0/+9
already known to be in UTC, the modifier becomes a no-op. This is not an incompatibility because the behavior is documented as "undefined" in that scenario. FossilOrigin-Name: b910a3d53769689d9212a06f974ccce54844bbe4
2015-03-13Remove debugging logic accidently included in the previous check-in.drh-1/+1
FossilOrigin-Name: 2887fb38ffc28712c34028cd38db2b7993d864eb
2015-03-12Fix the "now" option for date-time functions for cases when STAT4 is disabled.drh-1/+1
FossilOrigin-Name: 3ac1f6a3cf1a8fd3ab1ca96b2564c13c4b8d2234
2013-10-11Add requirements marks. No code changes.drh-0/+4
FossilOrigin-Name: 5e0d43ab55de006b20c58cb18b938d1c7b658e51
2013-09-16The date and time functions use the exact same notion of "now" for everydrh-0/+19
invocation within the same call to sqlite3_step(). FossilOrigin-Name: daf6ba413cb3cb6065774ba07495eab4a28b49b0
2012-06-19Improved accuracy on text-to-real and real-to-text conversions. Mostdrh-1/+1
conversions now round-trip correctly. Still need to fix some corner cases. FossilOrigin-Name: 8ecffca900cd6a8922001fd458a266ce8c83fb66
2010-09-30Do correct affinity transformations on floating point values which havedrh-1/+1
a decimal point at the beginning or end of the mantissa. Ticket [3998683a16a7076e08f5]. FossilOrigin-Name: ca154f97a590745539b2cbfd77eb319fd7392a40
2010-06-23Add a version number to the wal-index header. If SQLite encounters a version ↵dan-24/+26
number in either the wal or wal-index files that it does not understand, the operation is abandoned and SQLITE_CANTOPEN returned. FossilOrigin-Name: 8d0f8a7f70d6fb42369411a934b30f8c8ca8322f
2010-06-22Some changes to test scripts related to codec enabled versions of sqlite.dan-0/+5
FossilOrigin-Name: 85dd51a75c75b2a123744f646e04538e4e5d89b3
2009-04-16Make sure the 'unixepoch' converter in the date and time functions roundsdrh-1/+6
to the nearest millisecond rather than truncating downward to the next smaller millisecond. Ticket #3808. (CVS 6512) FossilOrigin-Name: e6e036b345b130c207716c4b81719b5b7c884a11
2009-04-01Fix the strftime() function so that the %s format can handle dates outsidedrh-2/+10
of the range of 1901 to 2038. Ticket #3769. (CVS 6430) FossilOrigin-Name: a95b843a9251ca9f9a23e8b67c2126f4c297a534
2009-01-30Fix a round-off error when moving dates by negative modifier amounts.drh-1/+23
Ticket #3618. Enhance the "NNN years" modifier to accept fractional years. (CVS 6220) FossilOrigin-Name: 86be908c5e77ba2b9ac98e394fa987b443d790f8
2008-07-08Add tests to verify correct behavior when mutex initialization fails. (CVS 5359)drh-4/+7
FossilOrigin-Name: 65875005ac8bc7988d7d7d8e8b999857449568fd
2008-06-12Fix a typo in the date/time function tests. Add additional cases todrh-2/+2
the zeroblob tests to make sure sqlite3_bind_zeroblob() does not use excess memory. (CVS 5216) FossilOrigin-Name: c1006fb1c817bc0b7fada873edb772abbf972012
2008-06-12Convert the date/time functions to work with milliseconds since thedrh-12/+30
julian epoch internally (instead of days since the epoch) in order to avoid problems with floating-point roundoff error. The interface is unchanged. (CVS 5215) FossilOrigin-Name: ed35f8a98323dadb64b423615287fb24ea262ffb
2008-06-12Added additional testcases for julianday calculations with midnight boundary ↵shane-1/+15
for UTC time. (CVS 5209) FossilOrigin-Name: edd2cb00ae606858d8ae138c69eee7821b8cd6ea
2008-05-20Added more DST boundary checks for 2006 and 2007. Added check for suspect ↵shane-12/+85
Windows DST implementations and warning about them. Ticket #2322. (CVS 5147) FossilOrigin-Name: 14226ff0a7af7b39a1089a17eeb5bbb8d09d778d
2008-04-15Fix a bug in the RTRIM collating sequence discovered while workingdrh-4/+20
on condition/decision branch coverage. Increase test coverage of the date/time functions. (CVS 5010) FossilOrigin-Name: c5435f71efa0b34c759bac4a15fdf43abf39ddfc
2008-02-21Accept "Z" as the zulu timezone at the end of date strings. (CVS 4805)drh-3/+11
FossilOrigin-Name: 4c9a7b42b797f42f2b1e2e8d6a260044bd22ef2d
2008-01-17Test coverage for date.c. (CVS 4722)drh-3/+6
FossilOrigin-Name: a676f949b68c968d7e71aceb060c1639b42ba680