1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00

(Fcurrent_time_zone): Assign gmt, instead of init.

This commit is contained in:
Richard M. Stallman 1993-05-23 18:04:25 +00:00
parent ae6756a26e
commit 2d88f74700

View File

@ -634,7 +634,7 @@ Thus, you can use times obtained from `current-time'\n\
and from `file-attributes'.\n\
\n\
Some operating systems cannot provide all this information to Emacs;\n\
in this case, current-time-zone will return a list containing nil for\n\
in this case, `current-time-zone' returns a list containing nil for\n\
the data it can't find.")
(specified_time)
Lisp_Object specified_time;
@ -643,13 +643,15 @@ the data it can't find.")
struct tm *t;
if (lisp_time_argument (specified_time, &value)
&& (t = gmtime(&value)) != 0)
&& (t = gmtime (&value)) != 0)
{
struct tm gmt = *t; /* Make a copy, in case localtime modifies *t. */
struct tm gmt;
long offset;
char *s, buf[6];
t = localtime(&value);
offset = difftm(t, &gmt);
gmt = *t; /* Make a copy, in case localtime modifies *t. */
t = localtime (&value);
offset = difftm (t, &gmt);
s = 0;
#ifdef HAVE_TM_ZONE
if (t->tm_zone)