From: drh Date: Mon, 8 Jan 2007 16:20:28 +0000 (+0000) Subject: Fix a date round-off problem in strftime(). Ticket #2153. (CVS 3575) X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fheads%2Fversion_2;p=thirdparty%2Fsqlite.git Fix a date round-off problem in strftime(). Ticket #2153. (CVS 3575) FossilOrigin-Name: 47fee16ba9bd8ab2820fe97e89480528114825cd --- diff --git a/manifest b/manifest index 085ae08a0d..5023a727a8 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -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 +C Fix\sa\sdate\sround-off\sproblem\sin\sstrftime().\s\sTicket\s#2153.\s(CVS\s3575) +D 2007-01-08T16:20:29 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 93658710c630127b5e374d54b606d0d8a66aaa49 +F src/date.c 3f080b6f46c6a96891987b439449e4096c98f925 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 46b91807f72d65bf24257426bdbee27acff87661 -R ebcd2da4f3e4d0011fad16c712b2fb2e +P e6a18741a47a4288fa9c4fef93443b19aff20fb9 +R 9093355d0bd0fe007078e08b28b0c272 U drh -Z a110c1159d9732f55869863190022fea +Z 0fe8caf53c43ccf6073cf4d684d73e3a diff --git a/manifest.uuid b/manifest.uuid index e8628ab073..3ca285fbf9 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -e6a18741a47a4288fa9c4fef93443b19aff20fb9 \ No newline at end of file +47fee16ba9bd8ab2820fe97e89480528114825cd \ No newline at end of file diff --git a/src/date.c b/src/date.c index 857207248c..9f4f75ade6 100644 --- a/src/date.c +++ b/src/date.c @@ -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.3 2007/01/08 13:43:38 drh Exp $ +** $Id: date.c,v 1.16.2.4 2007/01/08 16:20:29 drh Exp $ ** ** NOTES: ** @@ -826,7 +826,7 @@ static void strftimeFunc(sqlite_func *context, int argc, const char **argv){ j += strlen(&z[j]); break; } - case 'S': sprintf(&z[j],"%02d",(int)(x.s+0.5)); j+=2; break; + case 'S': sprintf(&z[j],"%02d",(int)x.s); j+=2; break; case 'w': z[j++] = (((int)(x.rJD+1.5)) % 7) + '0'; break; case 'Y': sprintf(&z[j],"%04d",x.Y); j+=strlen(&z[j]); break; case '%': z[j++] = '%'; break;