While trying to fix my previous database problem, I discovered that
FROM_UNIXTIME
does not function as I expected (or MySQL can't do math).  This is 3.23.38
(upgrading
to 3.23.40 in the next few days):

SELECT UNIX_TIMESTAMP(End_Time) - (Hours * 60 * 60) from ProjectTime;
+--------------------------------------------------+
| UNIX_TIMESTAMP(End_Time) - (Hours * 60.0 * 60.0) |
+--------------------------------------------------+
|                                     995986800.00 |
|                                     995988600.00 |
|                                     995999400.00 |
...

SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(End_Time) - (Hours * 60 * 60)) from
ProjectTime;
+-----------------------------------------------------------------+
| FROM_UNIXTIME(UNIX_TIMESTAMP(End_Time) - (Hours * 60.0 * 60.0)) |
+-----------------------------------------------------------------+
| 2001-07-24 11:30:00                                             |
| 2001-07-24 11:30:00                                             |
| 2001-07-24 14:30:00                                             |
...

SELECT FROM_UNIXTIME(995986800);
2001-07-24 11:00:00 (not 2001-07-24 11:30:00) ... what's wrong here??
--
Michael T. Babcock



---------------------------------------------------------------------
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