aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Belanger2007-08-25 01:35:31 +0000
committerJay Belanger2007-08-25 01:35:31 +0000
commit3707a0017b003c105bb0d8f54d0233887822cc39 (patch)
treed2b2d8765957d8f7e52ede95ef3ad96499329ef3
parent3baad51b54aafed6949b89f6d2eaeb1d319171ef (diff)
downloademacs-3707a0017b003c105bb0d8f54d0233887822cc39.tar.gz
emacs-3707a0017b003c105bb0d8f54d0233887822cc39.zip
(Time Zones): Explain that Calc will by default use daylight saving
time determined by the calendar.
-rw-r--r--man/calc.texi95
1 files changed, 36 insertions, 59 deletions
diff --git a/man/calc.texi b/man/calc.texi
index 685f945789f..194d36d8f5f 100644
--- a/man/calc.texi
+++ b/man/calc.texi
@@ -17095,69 +17095,45 @@ Pacific Time look like this:
17095 17095
17096@cindex @code{TimeZone} variable 17096@cindex @code{TimeZone} variable
17097@vindex TimeZone 17097@vindex TimeZone
17098With no arguments, @code{calc-time-zone} or @samp{tzone()} obtains an 17098With no arguments, @code{calc-time-zone} or @samp{tzone()} will by
17099argument from the Calc variable @code{TimeZone} if a value has been 17099default get the time zone and daylight saving information from the
17100stored for that variable. If not, Calc runs the Unix @samp{date} 17100calendar (@pxref{Daylight Saving,Calendar/Diary,The Calendar and the Diary,
17101command and looks for one of the above time zone names in the output; 17101emacs,The GNU Emacs Manual}). To use a different time zone, or if the
17102if this does not succeed, @samp{tzone()} leaves itself unevaluated. 17102calendar does not give the desired result, you can set the Calc variable
17103The time zone name in the @samp{date} output may be followed by a signed 17103@code{TimeZone} (which is by default @code{nil}) to an appropriate
17104adjustment, e.g., @samp{GMT+5} or @samp{GMT+0500} which specifies a 17104time zone name. (The easiest way to do this is to edit the
17105number of hours and minutes to be added to the base time zone. 17105@code{TimeZone} variable using Calc's @kbd{s T} command, then use the
17106Calc stores the time zone it finds into @code{TimeZone} to speed 17106@kbd{s p} (@code{calc-permanent-variable}) command to save the value of
17107later calls to @samp{tzone()}. 17107@code{TimeZone} permanently.)
17108 17108If the time zone given by @code{TimeZone} is a generalized time zone,
17109The special time zone name @code{local} is equivalent to no argument, 17109e.g., @code{EGT}, Calc examines the date being converted to tell whether
17110i.e., it uses the local time zone as obtained from the @code{date} 17110to use standard or daylight saving time. But if the current time zone
17111command. 17111is explicit, e.g., @code{EST} or @code{EDT}, then that adjustment is
17112 17112used exactly and Calc's daylight saving algorithm is not consulted.
17113If the time zone name found is one of the standard or daylight 17113The special time zone name @code{local}
17114saving zone names from the above table, and Calc's internal 17114is equivalent to no argument; i.e., it uses the information obtained
17115daylight saving algorithm says that time and zone are consistent 17115from the calendar.
17116(e.g., @code{PDT} accompanies a date that Calc's algorithm would also
17117consider to be daylight saving, or @code{PST} accompanies a date
17118that Calc would consider to be standard time), then Calc substitutes
17119the corresponding generalized time zone (like @code{PGT}).
17120
17121If your system does not have a suitable @samp{date} command, you
17122may wish to put a @samp{(setq var-TimeZone ...)} in your Emacs
17123initialization file to set the time zone. (Since you are interacting
17124with the variable @code{TimeZone} directly from Emacs Lisp, the
17125@code{var-} prefix needs to be present.) The easiest way to do
17126this is to edit the @code{TimeZone} variable using Calc's @kbd{s T}
17127command, then use the @kbd{s p} (@code{calc-permanent-variable})
17128command to save the value of @code{TimeZone} permanently.
17129 17116
17130The @kbd{t J} and @code{t U} commands with no numeric prefix 17117The @kbd{t J} and @code{t U} commands with no numeric prefix
17131arguments do the same thing as @samp{tzone()}. If the current 17118arguments do the same thing as @samp{tzone()}; namely, use the
17132time zone is a generalized time zone, e.g., @code{EGT}, Calc 17119information from the calendar if @code{TimeZone} is @code{nil},
17133examines the date being converted to tell whether to use standard 17120otherwise use the time zone given by @code{TimeZone}.
17134or daylight saving time. But if the current time zone is explicit,
17135e.g., @code{EST} or @code{EDT}, then that adjustment is used exactly
17136and Calc's daylight saving algorithm is not consulted.
17137
17138Some places don't follow the usual rules for daylight saving time.
17139The state of Arizona, for example, does not observe daylight saving
17140time. If you run Calc during the winter season in Arizona, the
17141Unix @code{date} command will report @code{MST} time zone, which
17142Calc will change to @code{MGT}. If you then convert a time that
17143lies in the summer months, Calc will apply an incorrect daylight
17144saving time adjustment. To avoid this, set your @code{TimeZone}
17145variable explicitly to @code{MST} to force the use of standard,
17146non-daylight-saving time.
17147 17121
17148@vindex math-daylight-savings-hook 17122@vindex math-daylight-savings-hook
17149@findex math-std-daylight-savings 17123@findex math-std-daylight-savings
17150By default Calc always considers daylight saving time to begin at 17124When Calc computes the daylight saving information itself (i.e., when
171512 a.m.@: on the second Sunday of March (for years from 2007 on) or on 17125the @code{TimeZone} variable is set), it will by default consider
17152the last Sunday in April (for years before 2007), and to end at 2 a.m.@: 17126daylight saving time to begin at 2 a.m.@: on the second Sunday of March
17153on the first Sunday of November. (for years from 2007 on) or the last 17127(for years from 2007 on) or on the last Sunday in April (for years
17154Sunday in October (for years before 2007). These are the rules that have 17128before 2007), and to end at 2 a.m.@: on the first Sunday of
17155been in effect in much of North America since 1966 and takes into 17129November. (for years from 2007 on) or the last Sunday in October (for
17156account the rule change that began in 2007. If you are in a 17130years before 2007). These are the rules that have been in effect in
17157country that uses different rules for computing daylight saving time, 17131much of North America since 1966 and take into account the rule change
17158you have two choices: Write your own daylight saving hook, or control 17132that began in 2007. If you are in a country that uses different rules
17159time zones explicitly by setting the @code{TimeZone} variable and/or 17133for computing daylight saving time, you have two choices: Write your own
17160always giving a time-zone argument for the conversion functions. 17134daylight saving hook, or control time zones explicitly by setting the
17135@code{TimeZone} variable and/or always giving a time-zone argument for
17136the conversion functions.
17161 17137
17162The Lisp variable @code{math-daylight-savings-hook} holds the 17138The Lisp variable @code{math-daylight-savings-hook} holds the
17163name of a function that is used to compute the daylight saving 17139name of a function that is used to compute the daylight saving
@@ -17221,7 +17197,8 @@ falls in this hour results in a time value for the following hour,
17221from 3 a.m.@: to 4 a.m. At the end of daylight saving time, the 17197from 3 a.m.@: to 4 a.m. At the end of daylight saving time, the
17222hour from 1 a.m.@: to 2 a.m.@: repeats itself; converting a date/time 17198hour from 1 a.m.@: to 2 a.m.@: repeats itself; converting a date/time
17223form that falls in this hour results in a time value for the first 17199form that falls in this hour results in a time value for the first
17224manifestation of that time (@emph{not} the one that occurs one hour later). 17200manifestation of that time (@emph{not} the one that occurs one hour
17201later).
17225 17202
17226If @code{math-daylight-savings-hook} is @code{nil}, then the 17203If @code{math-daylight-savings-hook} is @code{nil}, then the
17227daylight saving adjustment is always taken to be zero. 17204daylight saving adjustment is always taken to be zero.