On Mon, 2007-08-13 at 19:19 +0800, Ang Chin Han wrote: > The newer version ie > "use Time::Local" is encouraged.
End up using DateTime. Lots of dependency to pull in though.. And developing on my gentoo laptop rather than on Centos 4 Server which it will end up in.. (don't even know if there's rpms else it's cpan) > > TIMTOWTDI, but if you're inserting a timestamp (Re: the DBI mention) > into a db^Wpostgresql, just pass the string along. Postgresql has > some clever parser to convert strings to timestamp. At the expense of > parsing speed, of course. What is TIMTOWTDI?? BTW, heard of Class::DBI? someone in gentoo mail list suggested it. yeah.. I realise it when it understood whatever I was throwing at it. The change to Epoch time is to facilitate my using it to do countdowns and intervals. (from bash scripts.. didn't venture to _really_ using DateManip) > I'm not sure if you're storing it into the database as a big integer, > or preserving it as a timestamp, but I really, really suggest you keep > it a real timestamp (aka DATETIME) so you don't have to do nasty leap > year and leap seconds arithmetic on it to, say, select stuff by year. Nope.. will be preserving it as DATETIME since partitioning will be done by Ranges as well.. BTW, do you know if Postgres's \copy command supports using Replace like in MySQL? Mysqlimport --replace.. Can't seem to find it from the net just yet.. Problem is, pulling data from main server and data may be updated and the row's updated status will be reflected by a new timestamp. Mysqlimport permits me to just replace the older data. I believe \copy will puke. Don't want to resort to using multi line/value inserts. _______________________________________________ Slugnet mailing list [email protected] http://www.lugs.org.sg/mailman/listinfo/slugnet
