sql time

John Gerth gerth at graphics.stanford.edu
Tue Dec 3 14:04:09 EST 2013


Until very recently MySql only stored time to whole seconds, so Argus has always
stored time as double precision floating point number whose value is "unix time"
which is the number of seconds since 1970-01-01 00:00 UTC.

Mysql will convert this to a datetime value with
   select from_unixtime(....)
e.g. for the value in your note below:
 select from_unixtime(13876576.76528736);
+----------------------------------+
| from_unixtime(13876576.76528736) |
+----------------------------------+
| 1970-06-10 14:36:16.765287       |
+----------------------------------+

Which looks a perhaps you misplaced the decimal point as
the complementary Mysql function to convert to unix time shows:

select unix_timestamp(now()), from_unixtime( unix_timestamp(now()));
+-----------------------+---------------------------------------+
| unix_timestamp(now()) | from_unixtime( unix_timestamp(now())) |
+-----------------------+---------------------------------------+
|            1386097403 | 2013-12-03 19:03:23                   |
+-----------------------+---------------------------------------+

/J

On 12/3/2013 8:52 AM, GMAIL wrote:
> hi everyone
> 
> i find argus the best software for my analysis network.
> 
> i successes to install and run and save to the DB
> 
> but in the terminal i can see the "stime" as normal: H%M%S%...
> 
> but on the  DB i see some strange numbers: 13876576.76528736
> 
>  
> 
> how i can change this to see normal time index ?
> 
> thanks
> 



More information about the argus mailing list