Subject Re: [firebird-php] inserting timestamp values (now really)
Author Yves Glodt
On Monday 30 April 2007, Alan McDonald wrote:
> > Hello,
> >
> > it seems I am unable to insert any value into a TIMESTAMP column which is
> > different of 'NOW'.
> >
> > I set the following:
> >
> > ini_set('ibase.timestampformat', '%d.%m.%Y - %H:%M');
> >
> > ...and this seems to work well for formatting the displayed
> > resultset, but the
> > format of the dates to be inserted seems to be unaffected by this...
> >
> > Is there any other fixed format I need to use when I insert
> > timestamp data?
> >
> >
> > best regards,
> > yves
> >
> > p.s.
> > sorry for the previous prematurely sent mail
>
> I'd say that - (hyphen) is the killer. try a space instead between date and
> time.

I tried, but it seems that in general my ini_set is not respected at all.
By hazard I found out that the only thing I can get inserted is this format:


$_POST['date_debut_status'] = '2007-04-30 - 11:09:25';
$_POST['date_fin_status'] = '2007-04-30 - 11:09:25';

And even phpinfo tells me:
ibase.timeformat %H:%M:%S %H:%M:%S (localvalue, mastervalue)
ibase.timestampformat %d.%m.%Y - %H:%M %Y-%m-%d %H:%M:%S

Looks like php got my values, but not firebird-php.
I can add that on another box (debian lenny) I can not reproduce this.
The box which causes the trouble is debian sarge with selfcompiled php-5.2.1

/me hopeless


> Alan