** Return the current time as a 32-bit timestamp in UNIX epoch format (like ** time(2)). */
| 7362 | ** time(2)). |
| 7363 | */ |
| 7364 | static u32 zipfileTime(void){ |
| 7365 | sqlite3_vfs *pVfs = sqlite3_vfs_find(0); |
| 7366 | u32 ret; |
| 7367 | if( pVfs->iVersion>=2 && pVfs->xCurrentTimeInt64 ){ |
| 7368 | i64 ms; |
| 7369 | pVfs->xCurrentTimeInt64(pVfs, &ms); |
| 7370 | ret = (u32)((ms/1000) - ((i64)24405875 * 8640)); |
| 7371 | }else{ |
| 7372 | double day; |
| 7373 | pVfs->xCurrentTime(pVfs, &day); |
| 7374 | ret = (u32)((day - 2440587.5) * 86400); |
| 7375 | } |
| 7376 | return ret; |
| 7377 | } |
| 7378 | |
| 7379 | /* |
| 7380 | ** Return a 32-bit timestamp in UNIX epoch format. |