[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Timezone handling problem in icalendar.el/icalendar-import-*
From: |
Ulf Jasper |
Subject: |
Re: Timezone handling problem in icalendar.el/icalendar-import-* |
Date: |
Sat, 19 Dec 2009 13:16:29 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux) |
Christian Lynbech <address@hidden> writes:
>>>>>> "Ulf" == Ulf Jasper <address@hidden> writes:
>
> Ulf> Changed timezone names to "STD" and "DST". As I understand these are
> Ulf> just names and should consist of alphabetic characters only.
>
> Hm, perhaps.
>
> My understanding is/was that some names are recognized (such as CET for
> central europe or PST for pacific standard time). These maps to (the
> equivalent of) GMT+1 (for CET). Ie. I thought we had a synctactic requirement
> (must start with a letter and be at least three letters long) and a
> semantic (must belong to this particular set). If a function such as
> mktime() encounters something it cannot parse it wil just assume GMT.
>
> If this is correct, why not just use "GMT" rather than "STD" and "DST"?
The timezone names "DST" and "STD" together with the time-offsets and
daylight saving time definition are passed as ZONE argument to
encode-time. This in turn fills the environment variable TZ with this
data and calls tzset. The tzset manpage says:
The value of TZ can be one of three formats. The first format is used
when there is no daylight saving time in the local timezone:
std offset
The std string specifies the name of the timezone and must be three or
more alphabetic characters. The offset string immediately follows std
and specifies the time value to be added to the local time to get Coor‐
dinated Universal Time (UTC). The offset is positive if the local
timezone is west of the Prime Meridian and negative if it is east. The
hour must be between 0 and 24, and the minutes and seconds 0 and 59.
The second format is used when there is daylight saving time:
std offset dst [offset],start[/time],end[/time]
There are no spaces in the specification. The initial std and offset
specify the standard timezone, as described above. The dst string and
offset specify the name and offset for the corresponding daylight sav‐
ing timezone. If the offset is omitted, it default to one hour ahead
of standard time.
icalendar.el uses the "second format". It sets the timezone names std
and dst to "STD" and "DST", but could use any other strings as
well. These names are irrelevant -- only the offsets and start/end times
matter.
The VTIMEZONE element in the icalendar object *defines* a timezone which
is translated and passed to encode-time/tzset. It does not reference a
timezone defined elsewhere. The name of this timezone (std) is
irrelevant and so is the name of the daylight saving time (dst).
Ulf
--
Herzlichen Glückwunsch noch einmal, vergessen Sie Ihre Angaben,und dies
für die Art und Weise von der öffentlichen Bekanntmachung.