1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-10-23 21:49:02 +03:00

Fix a round-off error in the %W conversion of strftime(). Ticket #2150. (CVS 3572)

FossilOrigin-Name: e6a18741a47a4288fa9c4fef93443b19aff20fb9
This commit is contained in:
drh
2007-01-08 13:43:37 +00:00
parent 80b1ff487f
commit 7ee841f506
3 changed files with 9 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
C Fix\sa\sbad\svariable\sreference.\s\sThe\sreference\sis\sactually\sin\sunreachable\ncode\sand\sis\stherefore\sharmless.\s\sThe\sfix\sis\sto\sremove\sthe\scode.\s(CVS\s3483)
D 2006-10-24T11:26:44
C Fix\sa\sround-off\serror\sin\sthe\s%W\sconversion\sof\sstrftime().\s\sTicket\s#2150.\s(CVS\s3572)
D 2007-01-08T13:43:38
F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@@ -28,7 +28,7 @@ F src/btree.h 41cb3ff6ebc3f6da2d0a074e39ff8c7a2287469f
F src/btree_rb.c af40501eedd7b673ffd5e02f3a4702c76596d64a
F src/build.c ee7905531ed592bd68b484f0821fc3cd007e1576
F src/copy.c 750e13828c3e4a293123e36aaa7cf0f22466248a
F src/date.c 54befeafe3e2af041c22bcc49fd79f0396b75c4d
F src/date.c 93658710c630127b5e374d54b606d0d8a66aaa49
F src/delete.c 82001c74882319f94dab5f6b92a27311b31092ae
F src/encode.c fc8c51f0b61bc803ccdec092e130bebe762b0a2f
F src/expr.c 6bb3961c0391f2efe788fcfde3c2ff2ff283d5a8
@@ -191,7 +191,7 @@ F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604
F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
P 50d7e50a96907eeb1705687f7e54ed993b7a47c2
R c77ec6f24381efb80d29efe1f4d9fe81
P 46b91807f72d65bf24257426bdbee27acff87661
R ebcd2da4f3e4d0011fad16c712b2fb2e
U drh
Z ae06e605951ba4d71d40035420aba202
Z a110c1159d9732f55869863190022fea

View File

@@ -1 +1 @@
46b91807f72d65bf24257426bdbee27acff87661
e6a18741a47a4288fa9c4fef93443b19aff20fb9

View File

@@ -16,7 +16,7 @@
** sqliteRegisterDateTimeFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: date.c,v 1.16.2.2 2004/07/20 00:40:01 drh Exp $
** $Id: date.c,v 1.16.2.3 2007/01/08 13:43:38 drh Exp $
**
** NOTES:
**
@@ -806,7 +806,7 @@ static void strftimeFunc(sqlite_func *context, int argc, const char **argv){
y.M = 1;
y.D = 1;
computeJD(&y);
n = x.rJD - y.rJD;
n = x.rJD - y.rJD + 0.5;
if( zFmt[i]=='W' ){
int wd; /* 0=Monday, 1=Tuesday, ... 6=Sunday */
wd = ((int)(x.rJD+0.5)) % 7;