8a6f89c845
Remove unnecessary "www." prefixes on domain names in URLs.
...
FossilOrigin-Name: 20acd630b91609725794ce84f9eda01d5f3c898407f0948264830851d25ccaa6
2025-04-10 10:18:07 +00:00
255548562b
Fix date/time computations to deal with the sub-millisecond rounding
...
problem identified in [forum:/forumpost/766a2c9231|forum post 766a2c9231].
FossilOrigin-Name: afb0a5923a6db4045fab5226198aab970d746d4866294ebba943c6986e97ecde
2025-01-21 17:37:58 +00:00
3f273db39b
Adjust date/time functions so that they do a better job of keeping track
...
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-04 13:58:09 +00:00
aefa7afddb
Back out the previous change. Replace it with new date modifiers "ceiling"
...
and "floor".
FossilOrigin-Name: f0831cced2c919e409214d936c81473ae321a98c5bd78b5b729c1269bf71bc45
2024-03-03 20:15:36 +00:00
f52afaf738
Change the magic time-interval names that do truncate-to-same-month to be
...
"mnth" and "yr" - "month" and "year" without the vowels.
FossilOrigin-Name: 296b46c529d79385d7f4db2c789254a992c01ff66fe8ba6d3a3ce4aaac0203fb
2024-03-02 20:50:56 +00:00
d0603eda6c
Add support in the strftime() SQL function for conversion letters %G, %g,
...
%U, and %V.
FossilOrigin-Name: e1155d6aa4b960ecfd14fa3467f28672af3327699c547f5b9e75da3ac1348ff7
2024-01-18 16:50:25 +00:00
d4677f192f
Ensure that the YYYY-MM-DD input to date and time functions has been normalized
...
prior to returning a result.
[forum:/forumpost/6bb476897e|Forum post 6bb476897e].
FossilOrigin-Name: b692eb8ccb2d0645599ad73a8bdacf5df499114244aadeb38aabc580fc4dc7c5
2023-11-04 21:44:00 +00:00
a910f3f1c5
New conversion letters added to strftime(): %e, %k, %I, %l, %R, %P, %p, %T, %u.
...
FossilOrigin-Name: 058722b2d0b995195a8ce3effe9722ae1c18cb1e7a520b481030da0bd579fe41
2023-08-29 18:28:08 +00:00
88813681c2
Add some tests of subsecond modifier for date/time functions. Sync with trunk.
...
FossilOrigin-Name: 6499ebff545e663198bd0534be205a4e9ca68c7fb20fdcfa54fae4d9b79bfe3a
2023-05-04 20:19:33 +00:00
601e4d4a0f
Back out the 'txn' enhancement to date/time functions. The duration of a
...
"transaction" is confused and needs to be straightened out prior to moving
forward with this change.
FossilOrigin-Name: 4a145f07322d768a07619bed27e0390d50f3a01d07787b9296234a5ceb6f1218
2023-02-08 20:29:48 +00:00
159cbfe1cb
Test cases to show that CURRENT_TIMESTAMP and similar hold the same value
...
across a transaction.
FossilOrigin-Name: 7b2fa20e31b8a0314b9ccb97bb556898d552505dbc5943f248df3f86c0f4e008
2023-02-08 12:31:47 +00:00
3393ee7ff6
Simplify the code and add test cases.
...
FossilOrigin-Name: d3bed4caff561e71c396cc869c5b4d9bf216ba203485e738c12ec62741f1aba5
2023-02-07 23:55:59 +00:00
ea840117af
Fix the 'localtime' modifier in date/time functions so that it preserves
...
fractional seconds.
[forum:/forumpost/2ffbaa2c3fd7fb82|Forum post 2ffbaa2c3fd7fb82].
FossilOrigin-Name: 1c875b0764ab00e95c92f0ee329659e88041763e125c2891201d80f68c41f717
2022-03-05 20:12:53 +00:00
85548fac8d
Use the enhanced SQLITE_TESTCTRL_LOCALTIME_FAULT (2) capability to do better
...
testing of the 'localtime' and 'utc' modifiers to date/time functions.
FossilOrigin-Name: f38071946ac2e5bb61e6c0620507e4c94464999ac700d86c1a704b94eb1c009a
2022-02-11 14:08:05 +00:00
eadccaa926
Performance improve to the 'localtime' and 'utc' modifiers for date/time
...
functions.
FossilOrigin-Name: 85cb6014751a0572d28ebd839331d5d7a78de45c9e522adcd834a8a85746f32e
2022-02-10 15:40:40 +00:00
35a0925a23
Fix another corner-case for the 'start of ...' modifier in the date/time
...
functions. Related to ticket [6097cb92745327a1].
FossilOrigin-Name: 8831f4393dda42b3434e7767968caea84bbca2af
2017-03-03 20:43:43 +00:00
9715f7f033
Fix a bug in the 'start of ...' date/time modifiers when they follow a
...
julian day number. Fix for ticket [6097cb92745327a1].
FossilOrigin-Name: 081dbcfb6d82528cefecb36c4491fa6e1a790b17
2017-03-02 23:40:21 +00:00
d76a902c87
Further changes to the date/time functions to suppress harmless signed
...
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-30 00:48:28 +00:00
3edb157e23
The documentation says that the built-in date-time functions give undefined
...
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
2016-11-29 20:39:48 +00:00
caeca516a7
Enhance the 'utc' modifier on date/time functions so that if the LHS is
...
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-12-23 10:54:48 +00:00
e9b9f7599a
Remove debugging logic accidently included in the previous check-in.
...
FossilOrigin-Name: 2887fb38ffc28712c34028cd38db2b7993d864eb
2015-03-13 00:11:09 +00:00
3df79a9a1f
Fix the "now" option for date-time functions for cases when STAT4 is disabled.
...
FossilOrigin-Name: 3ac1f6a3cf1a8fd3ab1ca96b2564c13c4b8d2234
2015-03-12 23:48:27 +00:00
e4bf4f08c0
Add requirements marks. No code changes.
...
FossilOrigin-Name: 5e0d43ab55de006b20c58cb18b938d1c7b658e51
2013-10-11 20:14:37 +00:00
95a7b3e36d
The date and time functions use the exact same notion of "now" for every
...
invocation within the same call to sqlite3_step().
FossilOrigin-Name: daf6ba413cb3cb6065774ba07495eab4a28b49b0
2013-09-16 12:57:19 +00:00
72b3fbc7b5
Improved accuracy on text-to-real and real-to-text conversions. Most
...
conversions now round-trip correctly. Still need to fix some corner
cases.
FossilOrigin-Name: 8ecffca900cd6a8922001fd458a266ce8c83fb66
2012-06-19 03:11:25 +00:00
025586a259
Do correct affinity transformations on floating point values which have
...
a decimal point at the beginning or end of the mantissa.
Ticket [3998683a16a7076e08f5].
FossilOrigin-Name: ca154f97a590745539b2cbfd77eb319fd7392a40
2010-09-30 17:33:11 +00:00
10f5a50e57
Add a version number to the wal-index header. If SQLite encounters a version 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-23 15:55:43 +00:00
68928b6c3e
Some changes to test scripts related to codec enabled versions of sqlite.
...
FossilOrigin-Name: 85dd51a75c75b2a123744f646e04538e4e5d89b3
2010-06-22 13:46:43 +00:00
7fee360d09
Make sure the 'unixepoch' converter in the date and time functions rounds
...
to the nearest millisecond rather than truncating downward to the next
smaller millisecond. Ticket #3808 . (CVS 6512)
FossilOrigin-Name: e6e036b345b130c207716c4b81719b5b7c884a11
2009-04-16 12:58:03 +00:00
6eb41523f1
Fix the strftime() function so that the %s format can handle dates outside
...
of the range of 1901 to 2038. Ticket #3769 . (CVS 6430)
FossilOrigin-Name: a95b843a9251ca9f9a23e8b67c2126f4c297a534
2009-04-01 20:44:13 +00:00
c531a22377
Fix a round-off error when moving dates by negative modifier amounts.
...
Ticket #3618 . Enhance the "NNN years" modifier to accept fractional
years. (CVS 6220)
FossilOrigin-Name: 86be908c5e77ba2b9ac98e394fa987b443d790f8
2009-01-30 17:27:44 +00:00
c8d75674d6
Add tests to verify correct behavior when mutex initialization fails. (CVS 5359)
...
FossilOrigin-Name: 65875005ac8bc7988d7d7d8e8b999857449568fd
2008-07-08 02:12:37 +00:00
c91d86c95a
Fix a typo in the date/time function tests. Add additional cases to
...
the zeroblob tests to make sure sqlite3_bind_zeroblob() does not use
excess memory. (CVS 5216)
FossilOrigin-Name: c1006fb1c817bc0b7fada873edb772abbf972012
2008-06-12 18:05:40 +00:00
85f477a141
Convert the date/time functions to work with milliseconds since the
...
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-12 16:35:38 +00:00
f1aaaa4092
Added additional testcases for julianday calculations with midnight boundary for UTC time. (CVS 5209)
...
FossilOrigin-Name: edd2cb00ae606858d8ae138c69eee7821b8cd6ea
2008-06-12 05:16:14 +00:00
05eaf73c8c
Added more DST boundary checks for 2006 and 2007. Added check for suspect Windows DST implementations and warning about them. Ticket #2322 . (CVS 5147)
...
FossilOrigin-Name: 14226ff0a7af7b39a1089a17eeb5bbb8d09d778d
2008-05-20 14:01:59 +00:00
5f3a367bf3
Fix a bug in the RTRIM collating sequence discovered while working
...
on condition/decision branch coverage. Increase test coverage of
the date/time functions. (CVS 5010)
FossilOrigin-Name: c5435f71efa0b34c759bac4a15fdf43abf39ddfc
2008-04-15 04:02:40 +00:00
1cfdc90b43
Accept "Z" as the zulu timezone at the end of date strings. (CVS 4805)
...
FossilOrigin-Name: 4c9a7b42b797f42f2b1e2e8d6a260044bd22ef2d
2008-02-21 20:40:43 +00:00
008e476c28
Test coverage for date.c. (CVS 4722)
...
FossilOrigin-Name: a676f949b68c968d7e71aceb060c1639b42ba680
2008-01-17 22:27:53 +00:00
e6a58a4e2a
Allow sqllimits1.test to be run from a regular build of testfixture. Add the 'amalgamation-testfixture' target to main.mk - to build testfixture via sqlite3.c. (CVS 4354)
...
FossilOrigin-Name: d119427314d27f291b605073d34826cdb89746c1
2007-08-31 17:42:48 +00:00
5bb3eb9b9a
Eliminate all uses of sprintf() and strcpy(). These were not being
...
misused. But getting rid of them removes a library dependency. And
it avoids warnings from the OpenBSD compiler. Ticket #2336 . (CVS 3916)
FossilOrigin-Name: ba4845b32bdf38e623c4f7246e6e327715bbba4b
2007-05-04 13:15:55 +00:00
05f7c19a6e
Test coverage improvements. Over 90% of branches are now executed in
...
both directions. (CVS 3820)
FossilOrigin-Name: a776d93ccae3bfa6e992cdd1387571dd21561f98
2007-04-06 02:32:33 +00:00
2ecad3b443
Make sure the strftime() date conversions put in leading zeros correctly.
...
Ticket #2276 . (CVS 3749)
FossilOrigin-Name: e853067ec4db3eedfb4adcdd4172de2c55b9ac58
2007-03-29 17:57:21 +00:00
622fa9a80e
Fix another round-off problem in strftime(). Ticket #2153 . (CVS 3574)
...
FossilOrigin-Name: d49ddc5ff05dd65e73edfa76db7e1af36967d81a
2007-01-08 16:19:07 +00:00
c2c9eef6b3
Fix a round-off error in the %W and %j conversions of the strftime() function.
...
Ticket #2150 . (CVS 3570)
FossilOrigin-Name: 52067937803e6b36afc8f11c5d24059414208b77
2007-01-08 13:07:30 +00:00
9df9492adc
Fix a roundoff error in the %f converter of strftime(). Ticket #1991 . (CVS 3442)
...
FossilOrigin-Name: 51b9c755ea01528e32690aabe91236ed917369f1
2006-09-25 18:03:28 +00:00
f11c34df74
Bug fix in date/time computations. Ticket #1964 .
...
Some unrelated comment typos are also fixed and got accidently
checked in at the same time. (CVS 3396)
FossilOrigin-Name: c81eaa0dc9a327d222e066076c4a2da5e69d8c21
2006-09-08 12:27:36 +00:00
9645d8d4b3
Remove use of the "clock" command in the test suite so that the tests
...
will run in Tcl8.5. Ticket #1445 . (CVS 3380)
FossilOrigin-Name: bedbac54db173ceb74bd78acd021209f28aa30a8
2006-09-01 15:49:05 +00:00
5739103e98
Fix timezone parsing in the date/time functions. Ticket #1587 . (CVS 2891)
...
FossilOrigin-Name: 94c87b70161d4d44fbf1602fc2baae22dca08759
2006-01-09 00:18:02 +00:00
4cb29b4cfc
Allow the character "T" between date and time in ISO-8601 date/time formats.
...
Ticket #1170 . (CVS 2408)
FossilOrigin-Name: 2bf88daa57b01216c7bbe67972f479ee12be1193
2005-03-21 00:43:44 +00:00