« 2018年12月 | トップページ | 2020年3月 »

2019年1月

2019年1月19日 (土)

Generate files in iCalendar format in Excel 2

This is a Continuation of the previous article:"Generate files in iCalendar format in Excel 1"
I'm looking into the method of specifying the date and time.

Basically the date and time
is specified in the following format.
"Date" "T" "Time"

There are three kinds of specifying methods in detail as follows.
① Date with local time
② Date with UTC time
③ Date with local time and time zone reference

I'm looking in turn.


①Date with local time

Ex.: 20181127T010000

This specifies November 27, 2018 at 01:00:00.

Whichever time zone the schedule application is set to,
This method specifies the time above.

Even in New York time and Tokyo time
It will be 01: 00: 00.
Even if you read the same date and time schedule
It means that it will be another time if the time zone is different.

So it is not suitable for schedule exchange
between areas with different time zones.


②Date with UTC time
It is expressed in the form of ①(mentioned above) + "Z".

例)20181127T010000Z

This specifies 01:00:00 UTC on 27th November 2018.

UTC is what is said to be Coordinated Universal Time
and is the time standard of the world.

With this specification method
Whatever time zone the schedule application is set to
Specify the same time in the world.

In case of the time zone is Tokyo,
Because it is UTC + 0900 (= time difference from the standard is 9 hours)
It will be converted to 10:00:00 on November 27, 2018.
In case of the time zone is New York
Because it is UTC - 0500
It will be converted to 2:00:00 on November 26, 2018.


③Date with local time and time zone reference
To specify the time zone
Use the TZID property.

Ex.)TZID=Asia/Tokyo:20181127T100000

"TZID = Asia / Tokyo:" is the designated part of the time zone.
In this example
I have specified a time zone named "Asia / Tokyo".
The part "20181127 T100000" is the date and time like ①.

What kind of time zone is "Asia / Tokyo"
It is specified by the VTIMEZONE component.

Describe the following in iCal format data.

BEGIN:VTIMEZONE
TZID:Asia/Tokyo
BEGIN:STANDARD
TZOFFSETFROM:+0900
TZOFFSETTO:+0900
DTSTART:19700101T000000
END:STANDARD
END:VTIMEZONE

If you want to specify a different time zone,
Make the above example "Asia / Tokyo" another time zone name
Please correct "+0900" part
to the appropriate time difference from UTC.

| | コメント (0) | トラックバック (0)

« 2018年12月 | トップページ | 2020年3月 »