Thats seems like a bug to me.

I would think FROM_UNIXTIME would take a unixtime stamp
and covert it to what it is. We know its from GMT

UNIX timestamp =
The timestamp is the current time measured in the number
of seconds since
the Unix Epoch (January 1 1970 00:00:00 GMT).

Ron

-----Original Message-----
From: Keith C. Ivey [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 8:55 AM
To: [EMAIL PROTECTED]
Subject: Re: unixtime update syntax


On 2 Dec 2003 at 7:57, Ron McKeever wrote:

> I have a db that gets data dumped into it. One of the columns gets
> unix timestamp data "utime". I what to covert that into a datetime
> column so I can utlize indexes and such. But I still what the unixtime
> to remain.

You can use indexes with a Unix time column about as well as you can
with DATETIME.  What sort of queries are you wanting to do?  Having
the extra column may be unnecessary.

> I believe I have a good way to do this but I'm not sure why it's not
> converting the date right ( see at bottom ):

It seems to be converting the date right.  FROM_UNIXTIME() does the
opposite of UNIX_TIMESTAMP().  It takes an integer representing a
Unix time and converts it to a DATETIME in local time (not GMT).  It
would be nice if there were a FROM_UNIXTIME_TO_GMT() function, but
there isn't.

--
Keith C. Ivey <[EMAIL PROTECTED]>
Tobacco Documents Online
http://tobaccodocuments.org


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to