Hi,
Sorry, I don't mean to use a TIMESTAMP column type, but rather use an INT. Then to store the current time you just do:
my $now = time();
my $sql = 'INSERT INTO foo VALUES($now)';
To display it you can just use the localtime function.
my $display_time = localtime ($time);
or you can break it apart into whatever format you like. It's actually a lot less headaches if you want anything other then mysql yyyy-mm-dd format.
Cheers,
Alex
--
Gossamer Threads Inc.
Sorry, I don't mean to use a TIMESTAMP column type, but rather use an INT. Then to store the current time you just do:
my $now = time();
my $sql = 'INSERT INTO foo VALUES($now)';
To display it you can just use the localtime function.
my $display_time = localtime ($time);
or you can break it apart into whatever format you like. It's actually a lot less headaches if you want anything other then mysql yyyy-mm-dd format.
Cheers,
Alex
--
Gossamer Threads Inc.