🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.tcl
Article #225

[BUGFIX] [clock format 0 -format %Z -gmt 1] != "GMT"

#225
From: kabe
Date: Sun, 14 Dec 1997 00:00
62 lines
2599 bytes
$B$+$Y!wElKLBg3X(B

struct tm $B$K%?%$%`%>!<%s>pJs$,$J$$(BOS(SunOS5$B$H$+(B)$B$N$?$a!"(B
generic/tclClock.c$B$K$O(B #ifdef TCL_USE_TIMEZONE_VAR $B%U%i%0$,MQ0U$5$l$F$$$^$9$,!"(B
configure$B$G$3$l$r@_Dj$9$k2U=j$,$"$j$^$;$s!#(B
$B$3$N$h$&$J(BOS$B$G(B

	% clock format 0 -format %Z -gmt 1

$B$,(B GMT $B$K$J$i$J$$$h$&$G$"$l$P2<$N%Q%C%A$rEv$F$F$_$F2<$5$$!#(B

configure.in$B$@$1$N%Q%C%A$G$9$s$G!"Ev$F$?8e$K(B
autoconf$B$G(B configure $B$r:F9=C[$9$kI,MW$,$"$j$^$9!#(B

$B$$$A$*$&(Btcl8.0p2$BMQ$N%Q%C%A$G$9$,!"(Btcl7.6$B$K$bE,MQ$G$-$^$9!#(B

$B!t(Bcomp.lang.tcl$B$K$b=P$7$H$-$^$7$?$,!"$"$l$@$1:.$s$G$$$F(B
$B!t3+H/<T$KFI$^$l$F$$$k$N$+$I$&$+!D(B

------------------------------------------------------------------------------
 $B$+$Y(B@dais.is.tohoku.ac.jp                     $B#V#E#G#A(B $B#S#y#s#t#e#m#s(B MCMXCI
             $B!V<+J,$O%l!<%5!<$@$C$F$$$&$N$+$$!)(B $B$?$$$7$?$3$H$J$$$8$c$J$$$+!#!W(B
------------------------------------------------------------------------------
*** unix/configure.in.orig	Wed Nov 26 01:31:42 1997
--- unix/configure.in	Sun Dec 14 22:06:01 1997
***************
*** 268,273 ****
--- 268,300 ----
      AC_DEFINE(USE_DELTA_FOR_TZ)
  fi
  
+ #
+ # Solaris does not have timezone information in struct tm,
+ # so strftime(3C) returns environment variable TZ for "%Z" even if
+ # struct tm was gmtime(3C).
+ #
+ OTZ=$TZ
+ TZ=JST-9; export TZ
+ AC_MSG_CHECKING([if strftime works for gmtime])
+ AC_TRY_RUN([
+ #include <time.h>
+ extern int strcmp();
+ int main()
+ {
+     time_t t = 863800000L;
+     char buf[16];
+     strftime(buf, 16, "%Z", gmtime(&t));
+     exit strcmp(buf,"GMT");
+ }
+ ], tcl_ok=yes, tcl_ok=no, tcl_ok=no )
+ if test $tcl_ok = yes; then
+ 	AC_MSG_RESULT(yes)
+ else
+ 	AC_MSG_RESULT(no)
+ 	AC_DEFINE(TCL_USE_TIMEZONE_VAR)
+ fi
+ 
+ 
  #--------------------------------------------------------------------
  #	Some systems (e.g., IRIX 4.0.5) lack the st_blksize field
  #	in struct stat.
Technical Details
Message-ID: <670qfq$eq4@masamune.dais.is.tohoku.ac.jp>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS
X-Google-Thread: 15a83d,24ca37e4aedcb338,start
X-Google-Attributes: gid15a83d,public
From: kabe@dais.is.tohoku.ac.jp
Subject: [BUGFIX] [clock format 0 -format %Z -gmt 1] != "GMT"
Date: 1997/12/14
Message-ID: <670qfq$eq4@masamune.dais.is.tohoku.ac.jp>
X-Deja-AN: 298083501
Organization: Design and Analysis of Information Systems, Biosystem Information Sciences, Department of System Information Sciences, Graduate School of Information Sciences,Tohoku University, Sendai 980, Japan
Newsgroups: fj.lang.tcl