Diff
Not logged in

Differences From:

File src/timeline.c part of check-in [0239325f58] - On the "timeline" command, if a YYYY-MM-DD date string is entered without the "before" keyword, then show all changes on the date given. by drh on 2009-11-09 00:58:05. [view]

To:

File src/timeline.c part of check-in [e2431b17df] - Fix an issue with the command-line timeline. Fix typos in documentation. by drh on 2009-11-09 21:32:36. [view]

@@ -952,17 +952,18 @@
   }else if( name_to_uuid(&uuid, 0)==0 ){
     objid = db_int(0, "SELECT rid FROM blob WHERE uuid=%B", &uuid);
     zDate = mprintf("(SELECT mtime FROM plink WHERE cid=%d)", objid);
   }else{
+    const char *zShift = "";
     if( mode==3 || mode==4 ){
       fossil_fatal("cannot compute descendants or ancestors of a date");
     }
     if( mode==0 ){
-      mode = 1;
-      if( isIsoDate(zOrigin) ) zOrigin[9]++;
+      if( isIsoDate(zOrigin) ) zShift = ",'+1 day'";
     }
-    zDate = mprintf("(SELECT julianday(%Q, 'utc'))", zOrigin);
+    zDate = mprintf("(SELECT julianday(%Q%s, 'utc'))", zOrigin, zShift);
   }
+  if( mode==0 ) mode = 1;
   zSQL = mprintf("%z AND event.mtime %s %s",
      timeline_query_for_tty_m(),
      (mode==1 || mode==4) ? "<=" : ">=",
      zDate