/ Check-in [e7ded46b]
Login

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

Overview
Comment:Fix a bug in the computation of the current time for the alternative CURRENT_TIMESTAMP functions used when SQLITE_OMIT_DATETIME is defined.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e7ded46b5efabe521008d9043dd72bd1ca748316
User & Date: drh 2010-05-03 19:17:01
Context
2010-05-03
19:20
Unset some global TCL variables prior to use in test where prior tests can have those same variables set to an array value. check-in: 49bef00e user: drh tags: trunk
19:17
Fix a bug in the computation of the current time for the alternative CURRENT_TIMESTAMP functions used when SQLITE_OMIT_DATETIME is defined. check-in: e7ded46b user: drh tags: trunk
18:51
Documentation stubs for sqlite3_wal_autocheckpoint and sqlite3_wal_checkpoint. check-in: 31376242 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/date.c.

1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
  char zBuf[20];

  UNUSED_PARAMETER(argc);
  UNUSED_PARAMETER(argv);

  db = sqlite3_context_db_handle(context);
  sqlite3OsCurrentTimeInt64(db->pVfs, &iT);
  t = (iT - 100*(sqlite3_int64)244058755)/1000;
#ifdef HAVE_GMTIME_R
  {
    struct tm sNow;
    gmtime_r(&t, &sNow);
    strftime(zBuf, 20, zFormat, &sNow);
  }
#else







|







1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
  char zBuf[20];

  UNUSED_PARAMETER(argc);
  UNUSED_PARAMETER(argv);

  db = sqlite3_context_db_handle(context);
  sqlite3OsCurrentTimeInt64(db->pVfs, &iT);
  t = iT/1000 - 10000*(sqlite3_int64)21086676;
#ifdef HAVE_GMTIME_R
  {
    struct tm sNow;
    gmtime_r(&t, &sNow);
    strftime(zBuf, 20, zFormat, &sNow);
  }
#else