On Thu, Sep 26, 2002 at 03:45:20PM -0400, Glenn Maynard wrote:
> On Thu, Sep 26, 2002 at 03:16:14PM +0400, Alexander V. Lukyanov wrote:
> > > Note that cls and ls are the same--they're both GMT.  cls should be printing
> > > local time.  It looks like the timezone adjustment is going astray somewhere.
> >
> > Does this patch change anything? (patch attached)
>
> No luck.

Yet another try (previous patch did not call settz for unset TZ).
(patch attached).

--
   Alexander.                      | http://www.yars.free.net/~lav/
Index: misc.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/misc.cc,v
retrieving revision 1.56
diff -u -p -r1.56 misc.cc
--- misc.cc     2002/08/05 08:51:14     1.56
+++ misc.cc     2002/09/27 05:26:37
@@ -527,7 +527,7 @@ static void set_tz(const char *tz)
    if(!tz)
    {
       unsetenv("TZ");
-      return;
+      goto apply_tz;
    }
    static char *put_tz;
    static int put_tz_alloc;
@@ -542,6 +542,9 @@ static void set_tz(const char *tz)
       xfree(put_tz);
       put_tz=new_tz;
    }
+apply_tz:
+   // now initialize libc variables from env TZ.
+   settz();
 }
 static char *saved_tz=0;
 static void save_tz()

Reply via email to