aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 9ad4bac8d..963f8e768 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -43,7 +43,7 @@
** * Definitions of sqlite3_vfs objects for all locking methods
** plus implementations of sqlite3_os_init() and sqlite3_os_end().
**
-** $Id: os_unix.c,v 1.251 2009/05/08 11:34:37 danielk1977 Exp $
+** $Id: os_unix.c,v 1.252 2009/06/15 20:45:35 drh Exp $
*/
#include "sqliteInt.h"
#if SQLITE_OS_UNIX /* This file is used on unix only */
@@ -4065,7 +4065,11 @@ int sqlite3_current_time = 0; /* Fake system time in seconds since 1970. */
** return 0. Return 1 if the time and date cannot be found.
*/
static int unixCurrentTime(sqlite3_vfs *NotUsed, double *prNow){
-#if defined(NO_GETTOD)
+#if defined(SQLITE_OMIT_FLOATING_POINT)
+ time_t t;
+ time(&t);
+ *prNow = (((sqlite3_int64)t)/8640 + 24405875)/10;
+#elif defined(NO_GETTOD)
time_t t;
time(&t);
*prNow = t/86400.0 + 2440587.5;