2012-03-02 1 views

答えて

19

"情報交換のパートナー"がそれを省略することに同意しない限り必須です。

引用ISO 8601 standard、セクション4.3.2:

文字[T]はこれら 式の日の成分の時間の表現の 開始を指示する時間指示子として使用しなければなりません。 [...]情報交換のパートナーの相互の合意によって

NOTE、 文字[T]は が定義された他の人と一日表現の日時を混乱のない 危険性がないアプリケーションでは省略されてもよいですこの国際規格では、

省略すると、表現が機械可読であることを意味し、省略することができるという明確な合意がない場合は、それを残しておくことをお勧めします。日付はキース・トンプソンとしてISO-8601に準拠していない

+1

私はちょうど新しい日付(「2012-03-02T14:57:05」)ことを発見し、新しいしながら、ジャバスクリプトでは、時間帯に応じて時間を調整します日付( "2012-03-02T14:57:05")は時間を調整しません。 – code4j

+9

@ code4j:私は何かを見逃しましたか、それとも同じですか? –

+5

ああ私の神。私はTの手紙を削除するのを忘れました。 新しい日付( "2012-03-02T14:57:05"):新しい日付( "2012-03-02 14:57:05")はタイムゾーンに合わせて時間を調整します。時間 – code4j

7

が示されているが、それはRFC 3339、のISO 8601 ソートのプロファイルに準拠です。 RFC 3339から次のテキストの下のメモを参照してください:

date-time  = full-date "T" full-time 

    NOTE: Per [ABNF] and ISO8601, the "T" and "Z" characters in this 
    syntax may alternatively be lower case "t" or "z" respectively. 

    This date/time format may be used in some environments or contexts 
    that distinguish between the upper- and lower-case letters 'A'-'Z' 
    and 'a'-'z' (e.g. XML). Specifications that use this format in 
    such environments MAY further limit the date/time syntax so that 
    the letters 'T' and 'Z' used in the date/time syntax must always 
    be upper case. Applications that generate this format SHOULD use 
    upper case letters. 

    NOTE: ISO 8601 defines date and time separated by "T". 
    Applications using this syntax may choose, for the sake of 
    readability, to specify a full-date and full-time separated by 
    (say) a space character.