インターネット上での日付と時刻:タイムスタンプ(2桁で表す年)

広告

広告

原文

最終更新
2006-10-06T02:34:00+09:00
この記事のURI参照
https://www.7key.jp/rfc/3339/rfc3339_3.html#source

インターネット上での日付と時刻:タイムスタンプ(和訳)

最終更新
2006-10-06T08:10:00+09:00
この記事のURI参照
https://www.7key.jp/rfc/3339/rfc3339_3.html#translation

3. 2桁で表す年

   The following requirements are to address the problems of ambiguity
   of 2-digit years:

以下の要求事項は、2桁で表された年の曖昧さに関する問題への提言である:

      o  Internet Protocols MUST generate four digit years in dates.

インターネットプロトコルは、生成する日付の年を4桁にしなければならない(MUST)。

      o  The use of 2-digit years is deprecated.  If a 2-digit year is
         received, it should be accepted ONLY if an incorrect
         interpretation will not cause a protocol or processing failure
         (e.g. if used only for logging or tracing purposes).

2桁で表される年の仕様は廃止する。2桁年が受信された場合、その誤った解釈によりプロトコルもしくは処理のエラーを引き起こさない場合のみ、それは受理されるべきである(例えば、記録やトレース用途に対してのみ用いられる場合)。

      o  It is possible that a program using two digit years will
         represent years after 1999 as three digits.  This occurs if the
         program simply subtracts 1900 from the year and doesn't check
         the number of digits.  Programs wishing to robustly deal with
         dates generated by such broken software may add 1900 to three
         digit years.

2桁年を用いているプログラムが、1999年以降の年を3桁で表す可能性がある。プログラムがその年から単に1900を引き、結果の数字の桁数をチェックしない場合にこの問題が生じる。このように信頼のおけないソフトウェアによって生成された日付を正当に処理したいと望むプログラムは、3桁年に1900を加えることもできる。

      o  It is possible that a program using two digit years will
         represent years after 1999 as ":0", ":1", ... ":9", ";0", ...
         This occurs if the program simply subtracts 1900 from the year
         and adds the decade to the US-ASCII character zero.  Programs
         wishing to robustly deal with dates generated by such broken
         software should detect non-numeric decades and interpret
         appropriately.

2桁年を用いているプログラムが、1999年以降の年を、":0"、":1"…":9"、";0"と表す可能性がある。プログラムがその年から単に1900を引き、結果の数字の十の桁にUS-ASCII文字ゼロを加える場合にこの問題が生じる。このように信頼のおけないソフトウェアによって生成された日付を正当に処理したいと望むプログラムは、十の桁が非数値かどうかを検知した上で適切に解釈すべきである。

   The problems with two digit years amply demonstrate why all dates and
   times used in Internet protocols MUST be fully qualified.

2桁年に関する問題は、なぜインターネットプロトコルで用いられる日付と時刻がすべて完全に制限されなければならない(MUST)のかを解り易く説明するものである。

広告

Copyright (C) 2006 七鍵 key@do.ai 初版:2006年10月06日 最終更新:2006年10月06日