summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2011-08-08 11:53:35 -0400
committerChong Yidong <cyd@stupidchicken.com>2011-08-08 11:53:35 -0400
commit37e11a631937986f03f6216655ea1c964f7286aa (patch)
tree0ea4917e2a3f3d1a71a9a77ec4d45fccf92a6754 /src
parentd56176114c8c9226a43db4bf68df562486e454ed (diff)
Lisp code shouldn't use set-time-zone-rule except through setenv.
* time.el (display-time-world-list, display-time-world-display): * time-stamp.el (time-stamp-string): * vc/add-log.el (add-change-log-entry): Use setenv instead of set-time-zone-rule. * src/editfns.c (Fset_time_zone_rule): Document relationship with the setenv function. Fixes: debbugs:7337
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/editfns.c7
2 files changed, 9 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4df4455e86..cbe2d8659b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
2011-08-08 Chong Yidong <cyd@stupidchicken.com>
+ * editfns.c (Fset_time_zone_rule): Document relationship with the
+ setenv function.
+
* ftfont.c (ftfont_pattern_entity): Copy the extras argument to
the font entity extracted from the cache (Bug#8109).
diff --git a/src/editfns.c b/src/editfns.c
index 5eed386afb..297f7b6d7e 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2053,7 +2053,12 @@ static char *initial_tz;
DEFUN ("set-time-zone-rule", Fset_time_zone_rule, Sset_time_zone_rule, 1, 1, 0,
doc: /* Set the local time zone using TZ, a string specifying a time zone rule.
If TZ is nil, use implementation-defined default time zone information.
-If TZ is t, use Universal Time. */)
+If TZ is t, use Universal Time.
+
+Instead of calling this function, you typically want (setenv "TZ" TZ).
+That changes both the environment of the Emacs process and the
+variable `process-environment', whereas `set-time-zone-rule' affects
+only the former. */)
(Lisp_Object tz)
{
const char *tzstring;