Re: Guessing the date style from the timezone for postgresql postin st
On 20 Sep, Daniel Barclay wrote:
>> From: "Oliver Elphick" <olly@lfix.co.uk>
>> Style Date Datetime
>> -------------------------------------------------------
>> ISO 1999-07-17 1999-07-17 07:09:18+01
> ^
> Is that correct? Doesn't ISO 8601 specify the character "T"
> between the date and the time?
I haven't found the standard itself but here is a pretty good doc:
http://hydracen.com/dx/y2k/iso8601.htm
Excerpt:
------------------------------
The symbol "T" is used to separate the date and time parts of the
combined representation. This may be omitted by mutual consent of
those interchanging data, if ambiguity can be avoided.
The complete representation is as follows:
19930214T131030 or 1993-02-14T13:10:30
The date and/or time components independently obey the rules already
given in the sections above, with the restrictions:
1.The date format should not be truncated on the right
(i.e., represented with lower precision) and the time format
should not be truncated on the left (i.e., no leading hyphens).
2.When the date format is truncated on the left, the leading
hyphens may be omitted.
------------------------------
IMHO, but then we're using the ISO format here in Sweden,
1999-07-17 07:09:18+01 is unambiguous, but if you're going to do it
by the standard why not go all the way...
/Michael
--
Linux: Turn on...Tune in...Fork out...
Reply to: