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

Re: Guessing the date style from the timezone for postgresql postinst



>    Style      Date            Datetime
>    -------------------------------------------------------
>    ISO        1999-07-17      1999-07-17 07:09:18+01
>    SQL        17/07/1999      17/07/1999 07:09:19.00 BST
>    POSTGRES   17-07-1999      Sat 17 Jul 07:09:19 1999 BST
>    GERMAN     17.07.1999      17.07.1999 07:09:19.00 BST
>    NONEURO    07-17-1999      Sat Jul 17 07:09:19 1999 BST
>    US         07-17-1999      Sat Jul 17 07:09:19 1999 BST
>    EURO       17-07-1999      Sat 17 Jul 07:09:19 1999 BST
> 
> I propose to include the attached script. If the zone belongs to USA or
> Canada, I use American format; if it belongs to another country I use
> European format; if the country is unidentified I try to guess from
> the zone abbreviation and its offset from UTC.  For zones which aren't based
> on regional names I use ISO.
> 
> Are there any other countries besides USA and Canada which use American
> datestyle?  Am I right in thinking that Canada does? 

 Argentina uses dd/mm/yy, not dd-mm-yy.


Reply to: