mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Use integer rather than floating point compuations in converting from julian
day number to unix-time to avoid round-off errors on Borland compilers. Ticket #3769. (CVS 6445) FossilOrigin-Name: c26f97bd857f3ddb15e63216cdd4a00e06d8eac8
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
|
||||
** All other code has file scope.
|
||||
**
|
||||
** $Id: date.c,v 1.104 2009/04/01 20:44:14 drh Exp $
|
||||
** $Id: date.c,v 1.105 2009/04/03 12:04:37 drh Exp $
|
||||
**
|
||||
** SQLite processes all times and dates as Julian Day numbers. The
|
||||
** dates and times are stored as the number of days since noon
|
||||
@@ -954,7 +954,7 @@ static void strftimeFunc(
|
||||
case 'M': sqlite3_snprintf(3, &z[j],"%02d",x.m); j+=2; break;
|
||||
case 's': {
|
||||
sqlite3_snprintf(30,&z[j],"%lld",
|
||||
(i64)(x.iJD/1000.0 - 210866760000.0));
|
||||
(i64)(x.iJD/1000 - 21086676*(i64)10000));
|
||||
j += sqlite3Strlen30(&z[j]);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user