>Description:
  Invalid reporting of date calc          
>How-To-Repeat:
  note: SESSIONTS is TIMESTAMP type
 
  SELECT (NOW()-SESSIONTS) FROM WEBSESSIONS;
+-------------------+
| (NOW()-SESSIONTS) |
+-------------------+
|              1261 |
+-------------------+
1 row in set (0.00 sec)
 
mysql> SELECT (UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(SESSIONTS)) FROM
WEBSESSIONS;                              
+---------------------------------------------------+
| (UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(SESSIONTS)) |
+---------------------------------------------------+
|                                               748 |
+---------------------------------------------------+
1 row in set (0.00 sec)        
 
>Fix:
  Cast fields as UNIX_TIMESTAMP to get valid seconds between to periods.

 
 
>MySQL support: none
>Synopsis:  
>Severity:      non-critical
>Category:      mysql
>Class:         <[ sw-bug | doc-bug | change-request | support ] (one
line)>
>Release:       mysql-3.23.40 (Source distribution)
 
>Environment:
        <machine, os, target, libraries (multiple lines)>
System: Linux dbapp 2.4.2-2smp #1 SMP Sun Apr 8 20:21:34 EDT 2001 i686
unknown
Architecture: i686
 
Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
/usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''
LDFLAGS=''
LIBC:
lrwxrwxrwx    1 root     root           13 Aug  8  2001 /lib/libc.so.6
-> libc-2.2.2.so
-rwxr-xr-x    1 root     root      1236396 Apr  6  2001
/lib/libc-2.2.2.so
-rw-r--r--    1 root     root     26350254 Apr  6  2001 /usr/lib/libc.a
-rw-r--r--    1 root     root          178 Apr  6  2001 /usr/lib/libc.so
Configure command: ./configure  --prefix=/mysql
--localstatedir=/mysql/data




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.427 / Virus Database: 240 - Release Date: 12/6/2002
 


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to