aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1993-05-23 18:04:25 +0000
committerRichard M. Stallman1993-05-23 18:04:25 +0000
commit2d88f74700512945ed9467d35c0ddbeac72cbf4c (patch)
treedfb8815cd902a5d3c55eb9249cb93c5eb14fc50f /src
parentae6756a26ece01e999356d97da65b83cb5ffb9a1 (diff)
downloademacs-2d88f74700512945ed9467d35c0ddbeac72cbf4c.tar.gz
emacs-2d88f74700512945ed9467d35c0ddbeac72cbf4c.zip
(Fcurrent_time_zone): Assign gmt, instead of init.
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 352892199ed..30d165ece61 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -634,7 +634,7 @@ Thus, you can use times obtained from `current-time'\n\
634and from `file-attributes'.\n\ 634and from `file-attributes'.\n\
635\n\ 635\n\
636Some operating systems cannot provide all this information to Emacs;\n\ 636Some operating systems cannot provide all this information to Emacs;\n\
637in this case, current-time-zone will return a list containing nil for\n\ 637in this case, `current-time-zone' returns a list containing nil for\n\
638the data it can't find.") 638the data it can't find.")
639 (specified_time) 639 (specified_time)
640 Lisp_Object specified_time; 640 Lisp_Object specified_time;
@@ -643,13 +643,15 @@ the data it can't find.")
643 struct tm *t; 643 struct tm *t;
644 644
645 if (lisp_time_argument (specified_time, &value) 645 if (lisp_time_argument (specified_time, &value)
646 && (t = gmtime(&value)) != 0) 646 && (t = gmtime (&value)) != 0)
647 { 647 {
648 struct tm gmt = *t; /* Make a copy, in case localtime modifies *t. */ 648 struct tm gmt;
649 long offset; 649 long offset;
650 char *s, buf[6]; 650 char *s, buf[6];
651 t = localtime(&value); 651
652 offset = difftm(t, &gmt); 652 gmt = *t; /* Make a copy, in case localtime modifies *t. */
653 t = localtime (&value);
654 offset = difftm (t, &gmt);
653 s = 0; 655 s = 0;
654#ifdef HAVE_TM_ZONE 656#ifdef HAVE_TM_ZONE
655 if (t->tm_zone) 657 if (t->tm_zone)