Skip to content

Commit db4a0df

Browse files
committed
Fix conversion to Julian Day Number
1 parent 2730885 commit db4a0df

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vfs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <unistd.h>
1111

1212
#include <sqlite3.h>
13+
#include <cmath>
1314

1415
#include "../include/dqlite.h"
1516

@@ -2001,7 +2002,7 @@ static int vfsCurrentTime(sqlite3_vfs *vfs, double *piNow)
20012002
sqlite3_int64 iNow;
20022003
int rc = vfsCurrentTimeInt64(vfs, &iNow);
20032004
if (rc == SQLITE_OK) {
2004-
*piNow = (double)iNow;
2005+
*piNow = ((double)iNow) / 86400000.0;
20052006
}
20062007
return rc;
20072008
}

0 commit comments

Comments
 (0)