Re: [gnome-db] String to timestamp conversion





On 24 February 2011 16:20, Alexey Zakhlestin <indeyets gmail com> wrote:
On Thu, Feb 24, 2011 at 5:59 PM, Vivien Malerba <vmalerba gmail com> wrote:
>
>
> 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.

so, this should be ok, right?
"2011-01-01 00:00:00+00:00"

or is some other format used for timezone?

The last ":00" is not supported, so the timezone is limited to "+00" here.
For some examples of the time part understood, see the NR test:
http://git.gnome.org/browse/libgda/tree/tests/test-input-parsers.c#n128

Regards,

Vivien


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