閏時の扱い
RFC5545 3.3.5. Date-Time では日時で用いる時間帯は TZID=... という
指定で行うことになっています。
>If, based on the definition of the referenced time zone, the local
> time described occurs more than once (when changing from daylight
> to standard time), the DATE-TIME value refers to the first
> occurrence of the referenced time. Thus, TZID=America/
> New_York:20071104T013000 indicates November 4, 2007 at 1:30 A.M.
> EDT (UTC-04:00).
しかし、これでは閏時が扱えません。
一方、Google calendar API では、これを
TZID=America/New_York:20071104T013000-0400
と表して、
TZID=America/New_York:20071104T013000-0500
と識別できるようにしたようです。
これまで when_exe Ruby版では、ひとつの日時を指定するのに、TZID と
±HHMM の両方の指定をすると、時間帯の二重指定例外を発生するように
していたのですが、今回のバージョンアップで、「まず±HHMMで解釈して
日時の絶対値を確定させ、それをTZIDで変換して出力する」という動作に
変更しました。
これによって、Google calendar API で抽出したイベント情報も例外を
発生することなく扱えるようになりました。
関連記事 2014-07-28
指定で行うことになっています。
>If, based on the definition of the referenced time zone, the local
> time described occurs more than once (when changing from daylight
> to standard time), the DATE-TIME value refers to the first
> occurrence of the referenced time. Thus, TZID=America/
> New_York:20071104T013000 indicates November 4, 2007 at 1:30 A.M.
> EDT (UTC-04:00).
しかし、これでは閏時が扱えません。
一方、Google calendar API では、これを
TZID=America/New_York:20071104T013000-0400
と表して、
TZID=America/New_York:20071104T013000-0500
と識別できるようにしたようです。
これまで when_exe Ruby版では、ひとつの日時を指定するのに、TZID と
±HHMM の両方の指定をすると、時間帯の二重指定例外を発生するように
していたのですが、今回のバージョンアップで、「まず±HHMMで解釈して
日時の絶対値を確定させ、それをTZIDで変換して出力する」という動作に
変更しました。
これによって、Google calendar API で抽出したイベント情報も例外を
発生することなく扱えるようになりました。
関連記事 2014-07-28
この記事へのコメント