I have a Postgres table, like so:
create table test
(
time_stamp timestamp
);
I want to generate a string with PHP that will insert the current time, with milliseconds (or microseconds) into the table.
Based on some other research, I've tried inserting the results of:
date('Y-m-d H:i:s.u', time())
But I'm only getting seconds. Any ideas?
date()expects seconds as input anyways, so if you pass in a microtime, you're going to end up with some far-future time string, because it'll 1000000x bigger than what date()'s expecting.insert into test (time_stamp) values (current_timestamp)?