I have a timestamp with timezone field in PostgreSQL. When I update this field, I use something like this:
$date = date('Y-m-d H:i:s');
Although the SQL works fine, the date saved seem a little bit different to a classic timestamp with timezone date.
Example:
Default value set to "now()":
date 2009-04-06 14:39:53.662522+02
Update with a date set in php:
$date = date('Y-m-d H:i:s');
date 2009-04-06 14:39:53+02
The numbers removed on update are probably milliseconds but I'm not sure. I would like to know if there is a means to obtain with PHP the same format of date?