/ Check-in [e20d51f9]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Try again to get the HH:MM:SS modifier change right... (CVS 1279)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e20d51f94ed67b8864a435e5735f61f396662c21
User & Date: drh 2004-02-29 00:50:33
Context
2004-02-29
01:08
One more fix to the new HH:MM:SS modifier. This time add some test procedures too. (CVS 1280) check-in: 7b3b8968 user: drh tags: trunk
00:50
Try again to get the HH:MM:SS modifier change right... (CVS 1279) check-in: e20d51f9 user: drh tags: trunk
00:48
Fix a bug in the HH:MM:SS modifier change that was just checked in. (CVS 1278) check-in: 248b5500 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/date.c.

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
...
577
578
579
580
581
582
583
584
585



586
587
588
589
590
591
592
593
** This file contains the C functions that implement date and time
** functions for SQLite.  
**
** There is only one exported symbol in this file - the function
** sqliteRegisterDateTimeFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: date.c,v 1.14 2004/02/29 00:48:09 drh Exp $
**
** NOTES:
**
** SQLite processes all times and dates as Julian Day numbers.  The
** dates and times are stored as the number of days since noon
** in Greenwich on November 24, 4714 B.C. according to the Gregorian
** calendar system.
................................................................................
        int day;
        if( !isdigit(*z2) ) z2++;
        memset(&tx, 0, sizeof(tx));
        if( parseHhMmSs(z2, &tx) ) break;
        computeJD(&tx);
        computeJD(p);
        clearYMD_HMS_TZ(p);
        if( z[0]=='-' ) tx.rJD = -tx.rJD;
        day = (int)tx.rJD;



        p->rJD += tx.rJD - day;
        rc = 0;
        break;
      }
      z += n;
      while( isspace(z[0]) ) z++;
      n = strlen(z);
      if( n>10 || n<3 ) break;







|







 







<

>
>
>
|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
...
577
578
579
580
581
582
583

584
585
586
587
588
589
590
591
592
593
594
595
** This file contains the C functions that implement date and time
** functions for SQLite.  
**
** There is only one exported symbol in this file - the function
** sqliteRegisterDateTimeFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: date.c,v 1.15 2004/02/29 00:50:33 drh Exp $
**
** NOTES:
**
** SQLite processes all times and dates as Julian Day numbers.  The
** dates and times are stored as the number of days since noon
** in Greenwich on November 24, 4714 B.C. according to the Gregorian
** calendar system.
................................................................................
        int day;
        if( !isdigit(*z2) ) z2++;
        memset(&tx, 0, sizeof(tx));
        if( parseHhMmSs(z2, &tx) ) break;
        computeJD(&tx);
        computeJD(p);
        clearYMD_HMS_TZ(p);

        day = (int)tx.rJD;
        tx.rJD -= day;
        tx.rJD -= 0.5;
        if( z[0]=='-' ) tx.rJD = -tx.rJD;
        p->rJD += tx.rJD;
        rc = 0;
        break;
      }
      z += n;
      while( isspace(z[0]) ) z++;
      n = strlen(z);
      if( n>10 || n<3 ) break;