Hello,

SQLite version 3.3.4  

Linux ****** 2.4.31 #4 SMP Wed Apr 19 16:30:29 CDT 2006 i686 unknown unknown
GNU/Linux

 

I am just curious about SQLite's date and time manipulation functions. I am
using the sqlite3 command line interface on the above described platform.

 

When I select a datetime for 2^47:

sqlite> SELECT datetime(140737488355328, 'unixepoch');

4461763-06-20 05:22:07

 

Adding a second to the time  [2^47 +1] seems to add 2 seconds to the
return??

sqlite> SELECT datetime(140737488355329, 'unixepoch');

4461763-06-20 05:22:09

 

I suspect an overflow of some sort, but I cannot phrase it concisely.

 

Date time seems to return reasonable values up until  185327782012799 [you
tell me], after which the return format is not a valid date. 

Again, I suspect an overflow of some sort, can anyone explain?

 

sqlite> SELECT datetime(185327782012799, 'unixepoch');

5874773-08-15 23:59:58

sqlite> SELECT datetime(185327782012800, 'unixepoch');

-5884205--1-00 00:00:00

 

 

Not a critical item, nor important enough to be reported as a bug,

Just curious,

Christian Werner

Reply via email to