[sr-dev] Safe to change expires column in location table to type timestamp?

Alistair Cunningham acunningham at integrics.com
Mon Nov 4 22:27:20 CET 2013


On 04/11/13 18:18, Daniel-Constantin Mierla wrote:
> I thought timestamp storing the unix time stamp as seconds. I see that
> in mysql module, MYSQL_TYPE_TIMESTAMP is considered as integer value (so
> expects the seconds) and MYSQL_TYPE_DATETIME is stored over a time_t by
> converting from date-time string.

Yes, it appears that datetime and timestamp are stored differently 
internally, but present the same format in SQL commands. That's good 
news, and suggests we can convert columns between the two at will.

> I would do some basic tests to see if it works - on 32b looks like being
> ok. On 64b, the time_t is long int, iirc, so the sizes are different --
> speaking of these, this mapping has to be reviewed anyhow, I will look
> closer at it when I get a chance.

Thanks!

-- 
Alistair Cunningham
+1 888 468 3111
+44 20 799 39 799
http://integrics.com/



More information about the sr-dev mailing list