Re: [gnome-db] String to timestamp conversion





On 24 February 2011 15:28, Piotr Pokora <piotrek pokora gmail com> wrote:
Hi!

There's some issue with G_TYPE_STRING to GDA_TYPE_TIMESTAMP conversion:

'2011-01-01T00:00:00+00:00' can not be converted to timestamp, though, it's valid ISO 8601 datetime.

The function internally used is gda_parse_iso8601_timestamp() which does not (despite its name) handle the complete iso8601 format. As mentionned in its doc, the accepted format is:
"YYYY-MM-DD HH:MM:SS[.ms][TZ]".
Notice that instead of the 'T', a space is required.

Of course it could be done, and it would not be very diffcult (in particular the tests/test-input-parsers.c test should include the new test cases).
 

Also, was there any changes wrt timestamp's timezone?
I could set time offset using gda's timestamp's timezone in 4.0.
In 4.2, it doesn't work any longer.

I don't remember having changed anything deliberately. Do you have a test case so I can reproduce the problem?

Regards,

Vivien
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]