www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/06/16/09:20:07

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <779F20BCCE5AD31186A50008C75D9979171731@silldn_mail1.sanwaint.com>
From: "Fifer, Eric" <EFifer AT sanwaint DOT com>
To: "'Noel L Yap'" <yap_noel AT jpmorgan DOT com>, cygwin AT sourceware DOT cygnus DOT com
Subject: RE: TZ not working
Date: Fri, 16 Jun 2000 14:17:20 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)

------_=_NextPart_000_01BFD795.6115E6EC
Content-Type: text/plain;
	charset="iso-8859-1"


>I've installed cygwin-1.1.2 and now all dates are displayed as UTC.
Setting
>TZ=US/Eastern or TZ=EST or TZ=EDT doesn't work.  How are timezones
described in
>Cygwin?

Cygwin's localtime() can understand zoneinfo style (TZ=US/Eastern)
timezones provided you have the zoneinfo database.  The latest
code/data can be found at:

	ftp://elsie.nci.nih.gov/pub/tzcode2000d.tar.gz
	ftp://elsie.nci.nih.gov/pub/tzdata2000d.tar.gz

Unpack both of these in the same directory.  Apply the attached
patch (you'll probably want to change the default LOCALTIME in
the Makefile to your local timezone, or change it later with
/usr/local/etc/zic -l US/Eastern).  Then, "make INSTALL".

The date command (from shellutils) does not display the timezone
(from tzset()/tzname[]) because newlib's strftime() does not
implement %Z.  However, the tzcode package includes a date/strftime
that works better in this respect.  If this is what you want, you
can move the default /bin/date.exe aside.

Hope this helps.

Eric Fifer


------_=_NextPart_000_01BFD795.6115E6EC
Content-Type: application/octet-stream;
	name="tz.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="tz.patch"

--- date.c.orig	Thu Apr 20 20:42:55 2000=0A=
+++ date.c	Mon May 15 16:45:05 2000=0A=
@@ -43,6 +43,7 @@=0A=
 #if HAVE_UTMPX_H=0A=
 #include "utmpx.h"=0A=
 #endif=0A=
+#include <sys/unistd.h>=0A=
 =0A=
 /*=0A=
 ** The two things date knows about time are. . .=0A=
@@ -57,7 +58,7 @@=0A=
 #endif /* !defined SECSPERMIN */=0A=
 =0A=
 extern double		atof();=0A=
-extern char **		environ;=0A=
+/*extern char **		environ;*/=0A=
 extern char *		getlogin();=0A=
 extern time_t		mktime();=0A=
 extern char *		optarg;=0A=
@@ -436,7 +437,7 @@=0A=
 #include "netinet/in.h"=0A=
 #include "netdb.h"=0A=
 #define TSPTYPES=0A=
-#include "protocols/timed.h"=0A=
+/*#include "protocols/timed.h" */=0A=
 =0A=
 extern int		logwtmp();=0A=
 =0A=
--- Makefile.orig	Thu Apr 20 20:42:49 2000=0A=
+++ Makefile	Mon May 15 16:45:06 2000=0A=
@@ -9,7 +9,7 @@=0A=
 #	make zonenames=0A=
 # to get a list of the values you can use for LOCALTIME.=0A=
 =0A=
-LOCALTIME=3D	Factory=0A=
+LOCALTIME=3D	Europe/London=0A=
 =0A=
 # If you want something other than Eastern United States time as a =
template=0A=
 # for handling POSIX-style time zone environment variables,=0A=
@@ -207,7 +207,7 @@=0A=
 # before the first Monday in January when a "%V" format is used and =
January 1=0A=
 # falls on a Friday, Saturday, or Sunday.=0A=
 =0A=
-CFLAGS=3D=0A=
+CFLAGS=3D -Dunix -DHAVE_STRERROR=3D1 -DHAVE_ADJTIME=3D0 =
-DHAVE_SETTIMEOFDAY=3D0=0A=
 =0A=
 # If you want zic's -s option used when installing, uncomment the next =
line=0A=
 # ZFLAGS=3D	-s=0A=
@@ -220,7 +220,7 @@=0A=
 =0A=
 =
########################################################################=
#######=0A=
 =0A=
-cc=3D		cc=0A=
+cc=3D		gcc=0A=
 CC=3D		$(cc) -DTZDIR=3D\"$(TZDIR)\"=0A=
 =0A=
 TZCSRCS=3D	zic.c localtime.c asctime.c scheck.c ialloc.c=0A=
@@ -265,7 +265,7 @@=0A=
 		-rm -f $(TZDIR)/iso3166.tab $(TZDIR)/zone.tab=0A=
 		cp iso3166.tab zone.tab $(TZDIR)/.=0A=
 		-mkdir $(TOPDIR) $(ETCDIR)=0A=
-		cp zic zdump $(ETCDIR)/.=0A=
+		cp zic.exe zdump.exe $(ETCDIR)/.=0A=
 		-mkdir $(TOPDIR) $(MANDIR) \=0A=
 			$(MANDIR)/man3 $(MANDIR)/man5 $(MANDIR)/man8=0A=
 		-rm -f $(MANDIR)/man3/newctime.3 \=0A=
@@ -280,7 +280,7 @@=0A=
 =0A=
 INSTALL:	ALL install date.1=0A=
 		-mkdir $(TOPDIR) $(BINDIR)=0A=
-		cp date $(BINDIR)/.=0A=
+		cp date.exe $(BINDIR)/.=0A=
 		-mkdir $(TOPDIR) $(MANDIR) $(MANDIR)/man1=0A=
 		-rm -f $(MANDIR)/man1/date.1=0A=
 		cp date.1 $(MANDIR)/man1/.=0A=
@@ -334,7 +334,7 @@=0A=
 		if [ -x /usr/ucb/ranlib -o -x /usr/bin/ranlib ] ; \=0A=
 			then ranlib ,lib.a ; fi=0A=
 		$(CC) $(CFLAGS) date.o localtime.o asctime.o strftime.o \=0A=
-			$(LDLIBS) -lc ,lib.a -o $@=0A=
+			$(LDLIBS) ,lib.a -o $@=0A=
 		rm -f ,lib.a=0A=
 =0A=
 tzselect:	tzselect.ksh=0A=


------_=_NextPart_000_01BFD795.6115E6EC
Content-Type: text/plain; charset=us-ascii

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
------_=_NextPart_000_01BFD795.6115E6EC--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019