Big time


#1

e$B;W$$N)$C$F!"e(Btime_t e$B$r1[$($kHO0O$re(B Time
e$B$G07$&$3$H$KD)@o$7$Fe(B
e$B$_$^$7$?!#e(B

http://www.a-k-r.org/tmp/ruby-big-time.patch

e$BFbItE*$K$Oe(B timespec e$B$N$+$o$j$Ke(B VALUE
e$B$r;H$C$F$"$j$^$9!#e(B

% ./ruby -ve ‘p Time.utc(5670000000)’
ruby 1.9.2dev (2009-03-27) [i686-linux]
5670000000-01-01 00:00:00 UTC

% ./ruby -ve ‘p Time.now - 12000 * 365 * 24 * 60 * 60’
ruby 1.9.2dev (2009-03-27) [i686-linux]
-9983-03-15 07:44:10 +0900

e$B$3$l$r<B8=$9$k$N$KLdBj$K$J$k$N$O!“7k6I!“0J2<$N>pJs$r$I$&$d$Ce(B
e$B$FF@$k$+$H$$$&E@$G$9!#$3$l$i$N>pJs$5$($”$l$P!”$"$H$O7W;;$G$Ie(B
e$B$&$K$+$G$-$^$9!#e(B

  • e$B%7%9%F%$N%?%$%%>!<%s$K$*$1$k;~:9e(B
  • e$B1<ICe(B

localtime/gmtime e$B$,;H$($l$P!"$3$l$i$N>pJs$rF@$i$l$k$N$Ge(B
e$B$9$,!“e(Btime_t e$B$NHO0O30$G$O;H$($^$;$s$7!“HO0OFb$G$b;H$($J$$$3e(B
e$B$H$,$”$k!”$H$$$&$N$,LdBj$G$9!#e(B
(e$BHO0OFb$G;H$($J$$Nce(B: 64bit time_t e$B$G$Oe(B 32bit tm_year
e$B$,e(B overflow e$B$9$ke(B)

e$B$I$&BP=h$7$?$+$H$$$&$H!"$^$:1<IC$O%7%9%F%$,CN$C$F$$$kHO0O$@e(B e$B$1$r07$C$F$$$^$9!#e(B1e$BG/8e$h$j$b@h$N1<IC$,$I$&$J$k$+$OC/$bCN$ie(B e$B$J$$$N$G!"e(B32bit time_t e$B$J4D6-$G$be(B 2037e$BG/$K$J$k$^$G$O!"1<IC$Ne(B e$B>pJs$O$9$Y$FF@$i$l$^$9!#e(B(e$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$;$K$J$l$=$&$G$9!#e(B

e$B<BAu$NFbMF$O$o$+$C$F$J$$$G$9$,!";EMMLL$@$H!“e(BAPI e$B$K$*$$$Fe(B 99
e$B$re(B 1999 e$B$Ke(B
e$BFI$_49$($k!”$H$$$&$3$H$,e(B ruby e$B$Ne(B Time
e$B$G$b9T$J$o$l$F$$$k$N$G!"$=$&$$$&e(B
e$B$N$b9M$($kI,MW$,$"$j$^$9$+$M!#e(B

e$B<B8=$9$l$P!"$3$l$^$Ge(B ruby
e$B$N$$$/$D$+$NAH$9~$%/%i%9!"%b%8%e!<%k$G$O!“e(B
Unix/C
e$B$N5!G=$X$N%i%C%Q!<$H$7$F$NG{$j$,@_7W>e$N94$j$H$7$F8z$$$F$$$^$7$?e(B
e$B$,!”:#8e$O$b$&>/$7=@Fp$KBP1~$9$k!"$H$$$&E>49E@$K$J$k$H;W$$$^$9!#e(B


#3

e$B@.@%$G$9!#e(B

Tanaka A. wrote:

e$B;W$$N)$C$F!"e(Btime_t e$B$r1[$($kHO0O$re(B Time e$B$G07$&$3$H$KD)@o$7$Fe(B
e$B$_$^$7$?!#e(B

http://www.a-k-r.org/tmp/ruby-big-time.patch

e$B$$!"$9$4$$!#!#e(B

ne$BF|8e$H$+$N7W;;$rFq$7$/$9$k$H$$$&0UL#$G$O7gE@$G$7$g$&$+!#e(B

e$B$3$l$Oe(BDateTime#next_daye$B$N$h$&$J$b$N$rDI2C$9$k$N$O$I$&$G$7$g$&!#e(B

e$BK\Ev$Oe(BDuratione$B%/%i%9$,$"$k$H$$$$$s$G$9$1$l$I!"e(B
e$B%j%F%i%k$r9)IW$7$J$$$HC/$b;H$o$J$5$=$&$J$s$G$9$h$M$’!#e(B


#4

In article removed_email_address@domain.invalid,
“NARUSE, Yui” removed_email_address@domain.invalid writes:

e$B$3$l$Oe(BDateTime#next_daye$B$N$h$&$J$b$N$rDI2C$9$k$N$O$I$&$G$7$g$&!#e(B

e$B$^$!!“9M$($J$/$b$J$$$N$G$9$,!”$$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$1$G$O$"$j$^$;$s$,!"Lde(B
e$BBj$,5/$3$k%1!<%9$O$+$J$jM^$($i$l$k$h$&$K;W$$$^$9!#e(B


#5

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:38191] big time”
on Sat, 28 Mar 2009 02:18:08 +0900, Tanaka A. removed_email_address@domain.invalid
writes:

|e$B;W$$N)$C$F!“e(Btime_t e$B$r1[$($kHO0O$re(B Time e$B$G07$&$3$H$KD)@o$7$Fe(B
|e$B$_$^$7$?!#e(B
|
|http://www.a-k-r.org/tmp/ruby-big-time.patch
|
|e$BFbItE*$K$Oe(B timespec e$B$N$+$o$j$Ke(B VALUE e$B$r;H$C$F$”$j$^$9!#e(B

e$BF~$l$k$3$H$=$N$b$N$K$O;?@.$G$9!#%?%$%_%s%0$Oe(BYuguie$B$5$s$K$*$^e(B
e$B$+$;$7$^$9!#$9$0$C$F$o$1$K$O$$$+$J$$$G$7$g$&$M!#e(B


#6

In article removed_email_address@domain.invalid,
Tadayoshi F. removed_email_address@domain.invalid writes:

o Time e$B$OI8=`$G$"$ke(B
o Time e$B$K7gE@$,$"$k$N$O$7$+$?$,$J$$e(B

e$B!Ve(Btime_t e$B$@$+$i!W$H$$$&M}M3$KH?O@$9$k$N$O$J$+$J$+Fq$7$+$C$?e(B
e$B$N$G$7$g$&!#e(B

e$B:#!";d$,H?O@$9$k$J$i!Ve(Btime_t e$B$,K\Ev$KI,MW$K$J$k$^$G$Oe(B time_t
e$B$JCM$r:n$i$J$/$F$b$$$$$s$8$c$J$$$N!W$H$$$&$3$H$K$J$j$^$9!#e(B

e$B$?$H$($P!"%U%!%$%k$N%?%$%`%9%?%s%W$K@_Dj$9$k$K$Oe(B time_t e$B$JCMe(B
e$B$,$I$&$7$F$bI,MW$G$9$,!“0J2<$G$$$&$He(B Time.utc e$B$8$c$J$/$Fe(B
File.utime e$B$GNc30$K$9$l$P$$$$$s$8$c$J$$$N$+!”$H$$$&$3$H$G$9!#e(B

% ./ruby -e ’
t = Time.utc(3333,1,1)
p t
File.utime(t, t, “file”)

3333-01-01 00:00:00 UTC
-e:4:in utime': time out of system range (ArgumentError) from -e:4:in

e$B$^$!!“K\Ev$KFq$7$$$N$O%7%9%F%$,Ds6!$7$F$/$l$J$$;~:9$N>pJs$Ge(B e$B$"$C$F!"$3$l$K$D$$$F$Oe(B DateTime e$B$@$m$&$,e(B Time e$B$@$m$&$,L5M}$Je(B e$B$b$N$OL5M}$G$9!#J86g$r$$$o$l$?$i%7%9%F%$,Ds6!$7$F$/$l$J$$$+e(B
e$B$i!”$H$$$&$$$$$o$1$r$9$k$3$H$K$J$k$G$7$g$&!#e(BDateTime e$B$He(B Time
e$B$N0c$$$O!"%7%9%F%`$,Ds6!$7$F$/$l$?$ie(B Time e$B$O;H$&$H$$$&$H$3$me(B
e$B$G$7$g$&$+!#e(B

e$B<BAu$NFbMF$O$o$+$C$F$J$$$G$9$,!";EMMLL$@$H!“e(BAPI e$B$K$*$$$Fe(B 99 e$B$re(B 1999 e$B$Ke(B
e$BFI$_49$($k!”$H$$$&$3$H$,e(B ruby e$B$Ne(B Time e$B$G$b9T$J$o$l$F$$$k$N$G!"$=$&$$$&e(B
e$B$N$b9M$($kI,MW$,$"$j$^$9$+$M!#e(B

e$B$"$!!"$$$^$N$H$3$m;D$7$F$"$j$^$9$,!"$3$l$r5!$K$J$/$9$N$,BEEve(B
e$B$G$7$g$&$M!#e(B

Ruby 1.8.0 e$B$+$ie(B (-w e$B$r$D$1$l$Pe(B) e$B7Y9p$7$F$^$7$?$7!#e(B
e$B7Y9p$rIU$1$?$N$O;d$G$9$,!"7k6I$J$K$b$$$o$l$^$;$s$G$7$?$M!#e(B

e$B<B8=$9$l$P!"$3$l$^$Ge(B ruby e$B$N$$$/$D$+$NAH$9~$%/%i%9!"%b%8%e!<%k$G$O!“e(B
Unix/C e$B$N5!G=$X$N%i%C%Q!<$H$7$F$NG{$j$,@_7W>e$N94$j$H$7$F8z$$$F$$$^$7$?e(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$C$?e(B Date e$B%U%#!<%k%I$r$b$D%a!<%k$rAw$j$D$1$k$3$H$rKIe(B
e$B$0$b$N$O2?$b$"$j$^$;$s!#e(B
(e$B$3$NNc$O:#F|E~Ce$7$?e(B spam e$B$+$i:N$C$?<B:]$N$b$N$G$9!#e(B)

e$B$=$7$F!"$3$&$$$&;~9o$re(B Time e$B%*%V%8%’%/%H$K$7$h$&$H$9$k$He(B
ArgumentError e$B$K$J$C$F$7$^$$$^$9!#e(B

% /usr/bin/ruby -rtime -e ‘p Time.rfc822(“Sat, 28 Mar 3610 14:55:43
+0200”)’
/usr/lib/ruby/1.8/time.rb:292:in utc': time out of range (ArgumentError) from /usr/lib/ruby/1.8/time.rb:292:inrfc822’
from -e:1

e$B$3$l$O!“e(Btime_t
e$B$G$O@>Nqe(B3610e$BG/$N;~9o$rI=8=$G$-$J$$$?$a$G$9!#e(B
e$B$3$N$?$a!”%a!<%k$rFI$_9~$s$@$H$-$Ke(B Time e$B%*%V%8%’%/%H$r@8@.$9e(B
e$B$k$H!"%a!<%k$K$h$C$F$ONc30$,5/$-$k$N$G$&$^$/$$$-$^$;$s!#e(B

e$B$7$+$7!"e(BTime e$B%%V%8%’%/%H$,e(B time_t
e$B$r>o$KI,MW$H$9$k$o$1$G$Oe(B
e$B$"$j$^$;$s!#%U%!%$%k$N%?%$%%9%?%s%W$r@_Dj$9$kEy!"%7%9%F%$He(B
e$B$N%$%s%?!<%U%’!<%9$G$OI,MW$K$J$j$^$9$,!"$=$l$O$=$&$$$&%$%s%?!<e(B
e$B%U%’!<%9$r;H$C$?CJ3,$GNc30$r5/$3$;$P$$$$$N$G$O$J$$$G$7$g$&$+!#e(B
e$BC1$Ke(B Ruby e$B$NFbIt$Ge(B Time
e$B%
%V%8%’%/%H$r@8@.$7!"Hf3S$7$?$j$9$ke(B
e$B$V$s$K$Oe(B time_t e$B$NCM$r@8@.$9$kI,MW$O$J$$$O$:$G$9!#e(B

e$B$3$&$$$&;~9o$NHO0O$NLdBj$O!"%a!<%k$@$1$K8B$j$^$;$s!#$?$H$($Pe(B
YAML e$BFb$N;~9o$H$+!"e(BSQL e$B$G07$&;~9o$H$+!"0lHL$Ke(B time_t
e$B$H$O4Xe(B
e$B78$J$$J8L.$GI=8=$5$l$?;~9o$r07$&$H$-$K$O>o$KLdBj$K$J$j$^$9!#e(B

e$B$=$&$$$&$H$-$Oe(B DateTime e$B$r;H$($H$$$&$N$,e(B FAQ
e$B$G$9$,!"$=$b$=e(B
e$B$be(B FAQ e$B$K$J$k$[$Ie(B Time
e$B$,;H$o$l$F$$$k$H$$$&8=<B$,$"$k$o$1$G!"e(B
Time e$B$G$d$C$F$b$$$$$s$8$c$J$$$G$7$g$&$+!#e(B

e$B$^$?!“e(BDateTime e$B$@$H1<IC$,07$($J$$$H$$$&LdBj$b$”$j$^$9!#5$$Ke(B
e$B$9$k?M$OB?$/$J$$$+$b$7$l$^$;$s$7!“e(BTime e$B$G$”$C$F$b%7%9%F%`<!e(B
e$BBh$G$9$,!#e(B

Time e$B$r3HD%$9$k>e$G$NLdBjE@$O$$$/$D$+$"$j$^$9$,!“0J2<$N$h$&e(B
e$B$K$=$l$J$j$K2r7h2DG=$G$9!#$A$g$C$HL5M}$r$7$F$$$k$H$3$m$b$”$je(B
e$B$^$9$1$l$I!#e(B

(e$B$3$3$Ke(B [ruby-dev:38191] e$B$Ne$NLdBjE@$HBP=h$NOC$rA^F~e(B)

e$B$I$s$J$b$s$G$7$g$&e(B?


#7

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:38199] Re: big time”
on Sun, 29 Mar 2009 01:31:14 +0900, Tanaka A. removed_email_address@domain.invalid
writes:

|> e$BF~$l$k$3$H$=$N$b$N$K$O;?@.$G$9!#%?%$%_%s%0$Oe(BYuguie$B$5$s$K$*$^e(B
|> e$B$+$;$7$^$9!#$9$0$C$F$o$1$K$O$$$+$J$$$G$7$g$&$M!#e(B
|
|1.9.2 e$B$rA[Dj$7$F$$$?$s$G$9$,!"$=$l$OAa$9$.$k$C$F$3$H$G$9$+e(B?

Yuguie$B$5$s!"$I$&;W$$$^$9$+!)e(B


#8

In article removed_email_address@domain.invalid,
Yukihiro M. removed_email_address@domain.invalid writes:

e$BF~$l$k$3$H$=$N$b$N$K$O;?@.$G$9!#%?%$%_%s%0$Oe(BYuguie$B$5$s$K$*$^e(B
e$B$+$;$7$^$9!#$9$0$C$F$o$1$K$O$$$+$J$$$G$7$g$&$M!#e(B

1.9.2 e$B$rA[Dj$7$F$$$?$s$G$9$,!"$=$l$OAa$9$.$k$C$F$3$H$G$9$+e(B?

Time e$B$N<BAu$Oe(B time.c e$BFbIt$K1#JC$5$l$F$$$F30It$+$i$O8+$($J$$e(B
e$B$N$G!"%$%s%?!<%U%’!<%9$OJQ$o$j$^$;$s!#e(B


#9

e$BKNIt$G$9!#e(B

Tanaka A. e$B$5$s$O=q$-$^$7$?e(B:

e$B:#!";d$,H?O@$9$k$J$i!Ve(Btime_t e$B$,K\Ev$KI,MW$K$J$k$^$G$Oe(B time_t
e$B$JCM$r:n$i$J$/$F$b$$$$$s$8$c$J$$$N!W$H$$$&$3$H$K$J$j$^$9!#e(B

e$B$?$H$($P!"%U%!%$%k$N%?%$%`%9%?%s%W$K@_Dj$9$k$K$Oe(B time_t e$B$JCMe(B
e$B$,$I$&$7$F$bI,MW$G$9$,!“0J2<$G$$$&$He(B Time.utc e$B$8$c$J$/$Fe(B
File.utime e$B$GNc30$K$9$l$P$$$$$s$8$c$J$$$N$+!”$H$$$&$3$H$G$9!#e(B

e$B$3$N%Q%C%A$,6qBNE*$K$I$&$H$$$&OC$G$O$J$/!"$b$&$A$g$C$H0lHLE*$JJ}?K$H$7$F!"$I$&e(B
e$B$+$J$"$H$$$&5$$,$7$F$$$^$9!#IT@5$JCM$,8+$D$+$k$N$OAa$1$l$PAa$$Dx$h$$$H;W$&$+$ie(B
e$B$G$9!#e(B

e$B$?$H$($P!“e(Btouch(1)e$B$N%/%m!<%s$r:n$C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#e(B


#11

Tanaka A. e$B$5$s$O=q$-$^$7$?e(B:

e$B$^$!!"F,$NCf$G$$$/$i9M$($F$bEz$($,=P$kOC$G$O$J$$$N$G!“MQK!$Ne(B
e$B$[$&$+$i96$a$F$$$/$s$G$9$+$M$’!#$^$:$O<BNc$N<}=8$G$7$g$&$+!#e(B
e$B8D?ME*$K$O=8$a$F$J$$$s$G$9$,!”$@$l$+=8$a$F$k?M$$$^$;$s$+$M$’!#e(B

e$B@Q6KE*$K=8$a$F$$$k$o$1$G$O$"$j$^$;$s$,!"$R$H$DCN$C$F$$$k<BNc$H$7$F$O!"e(Bcrontabe$B$Ke(B

X Y * * * cmd

e$B$H$+=q$$$F$"$C$F!"e(BYe$B;~e(BXe$BJ,$,0lF|$Ke(B0e$B2s$H$+e(B2e$B2s$H$+=P8=$9$k>l9g$K$I$&$9$k$+$G$9$,!"e(B

  • 0e$B2s$N>l9g$OA02s$N<B9T$Ne(B24e$B;~4V8e$K<B9Te(B
  • 2e$B2s$N>l9g$O:G=i$NJ}$@$1<B9T!"e(B2e$B2sL$O%9%-%C%We(B

e$B$H$9$k!"$H$$$&5-=R$,!“e(BHP-UXe$B$Ne(Bmane$B$K$O$”$k$h$&$G$9e(B[1]e$B!#$^$?!“e(BFreeBSDe$B$Ne(Bmane$B$K$h$k$He(B
[2]e$B!”$=$N$h$&$J5sF0$r%*%W%7%g%s$H$7$F;XDj$9$k$3$H$,$G$-$k$h$&$G$9!#$^$"$D$^$j!"e(B
crone$B$NNc$+$i8@$&$He(Bnext_daye$B$Oe(B24e$B;~4V8e$,BEEv$J$h$&$K8+$($^$9!#e(B

[1]http://docs.hp.com/ja/B2355-90852/cron.1M.html
[2]http://www.freebsd.org/cgi/man.cgi?query=cron&sektion=8


#12

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:38201] Re: big time”
on Sun, 29 Mar 2009 09:41:50 +0900, Tadayoshi F.
removed_email_address@domain.invalid writes:

|e$B>/$7OC$,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$G$-$k$+$H$$$&$H!"$A$g$C$H$o$+$j$^$;$s!#e(B


#14

In article removed_email_address@domain.invalid,
“NARUSE, Yui” removed_email_address@domain.invalid writes:

e$B$H$3$m$G!"$U$H5$$E$$$?$N$G$9$,!":#$N%Q%C%A$@$He(B

Time.utc(-1,1,1,0,0,0)+606024*(365+58)
=> 0-02-28 00:00:00 UTC
Time.utc(-1,1,1,0,0,0)+606024*(365+59)
=> 0-03-01 00:00:00 UTC
e$B$3$&$J$k$s$G$9$,!"e(B0e$BG/e(B(=BC 1e$BG/e(B)e$B$C$F1<G/$8$c$J$$$G$9$+$M!#e(B
e$B860x$O!“I,MW0J>e$Ke(B1900e$B$r2C$($F$$$kItJ,$,$”$k$+$i$N$h$&$G$9!#e(B

e$B$?$7$+$K!#D>$7$F$*$-$^$9!#e(B


#15

e$B@.@%$G$9!#e(B

Tanaka A. wrote:

e$B$N$I$A$i$J$N$+!"e(B

e$B$H$j$"$($:D9$$$b$N$NMM;R$r8+$F$_$k$H!"e(B
PostgreSQLe$B$Oe(B24e$B;~4V8ee(B (246060e$BIC8ee(B) e$B$G$9$M!#e(B
e$B$J$*!"1<IC$@$He(B24e$B;~4V8e$,F1$8F|$K$J$j$&$k$s$G$9$,!"e(B
e$B0J2<$N$h$&$K1<IC$r<!$NF|$Ne(B00e$BIC$re(B2e$B2s$H$$$&J}K!$G<BAu$7$F$$$^$7$?!#e(B

e$B$^$!!"F1$8F|$@$C$?$i$b$&e(B1e$BIC2C$($k$N$,@52r$J5$$,$7$^$9$1$I!#e(B

postgres=# SELECT ((timestamp ‘1972-06-30 23:59:59’ AT TIME ZONE
‘right/UTC’ + INTERVAL ‘0 year 0 seconds’) AT TIME ZONE ‘right/UTC’);
timezone

1972-06-30 23:59:59
(1 row)

postgres=# SELECT ((timestamp ‘1972-06-30 23:59:59’ AT TIME ZONE
‘right/UTC’ + INTERVAL ‘0 year 1 seconds’) AT TIME ZONE ‘right/UTC’);
timezone

1972-07-01 00:00:00
(1 row)

postgres=# SELECT ((timestamp ‘1972-06-30 23:59:59’ AT TIME ZONE
‘right/UTC’ + INTERVAL ‘0 year 2 seconds’) AT TIME ZONE ‘right/UTC’);
timezone

1972-07-01 00:00:00
(1 row)

e$B$^$?!"e(BXML
Schemae$B$r8+$k$H0l1~e(B1e$BF|8e$K$J$C$F$$$k$N$G$9$,!"e(B
http://www.w3.org/TR/xmlschema-2/#adding-durations-to-dateTimes
http://www.w3.org/TR/xmlschema11-2/#d0e29708
e$BFbIt=hM}$Oe(BUTC or local
(e$B$H$$$&$+%?%$%`%>!<%sITDj$H$$$&$Y$-$+e(B)e$B$G$+$D!"e(B
e$B1<IC$O=hM}7O0MB8e(B(1.1e$B$G$OL5;k$H5,Dje(B)e$B$H$$$&;EMM$J$N$G!"e(B
24e$B;~4V8e$HJQ$o$j$^$;$s$M!#e(B

e$B$J$!"$_$s$JBg9%$-e(BActiveSupporte$B$b$b$A$m$se(B2460*60e$BIC8e$G!"e(B
e$B1<IC$K$OHsBP1~$K8+$($^$9!#e(B

e$B$H$3$m$G!"$U$H5$$E$$$?$N$G$9$,!":#$N%Q%C%A$@$He(B

Time.utc(-1,1,1,0,0,0)+606024*(365+58)
=> 0-02-28 00:00:00 UTC
Time.utc(-1,1,1,0,0,0)+606024*(365+59)
=> 0-03-01 00:00:00 UTC
e$B$3$&$J$k$s$G$9$,!"e(B0e$BG/e(B(=BC
1e$BG/e(B)e$B$C$F1<G/$8$c$J$$$G$9$+$M!#e(B
e$B860x$O!“I,MW0J>e$Ke(B1900e$B$r2C$($F$$$kItJ,$,$”$k$+$i$N$h$&$G$9!#e(B


#16

Tanaka A. e$B$5$s$O=q$-$^$7$?e(B:

e$B$N2r<a$K%P%0$,$"$C$F!“585A0e(B3e$B2/@$5$H$+!”$J$s$G$b$$$$$G$9$1$I!"$H$b$+$/%U%!%$%ke(B

e$B$-$^$9!#e(B

e$B$7$+$7!“u$H$7$F$O$=$&$O;W$$$^$;$s!#e(BTime e$B%*%V%8%’%/%H$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ib::GzipWriter.open("/dev/null") {|gz|
gz.mtime = Time.at(1<<32 - 1)
}’
ruby 1.9.2dev (2009-03-11 trunk 22881) [x86_64-linux]
-e:2:in mtime=': integer 2147483648 too big to convert toint’
(RangeError)
from -e:2:in block in <main>' from -e:2:inopen’
from -e:2:in `’
zsh: exit 1 ruby -rzlib

e$B$@$s$@$sOC$,$:$l$F$-$?$Je(B

e$B$^$9!#e(B

e$B$?$@!“MQK!$K0MB8$9$k$h$&$J;EMM$O$=$b$=$b$h$m$7$/$J$$!”$H$$$&e(B
e$B$3$H$J$i$=$l$O$=$l$G79D0$KCM$9$k0U8+$@$H;W$$$^$9!#e(B

e$B$b$7$=$&$@$H$9$k$H!“e(Btime_t e$B$H$$$&MQK!$K0MB8$7$?;EMM$O$h$/$Je(B
e$B$/$F!“e(BTime e$B$O;~9o$H$$$&$b$N$N@-<A<+BN$K<+A3$KBP1~$9$k$h$&$Ke(B
e$B$9$Y$-$G!”>/$J$/$H$be(B 2038e$BG/$GES@Z$l$k$H$$$&$N$O$J$s$H$bIT<+e(B
e$BA3!”$H$$$&$3$H$K$J$k5$$,$7$^$9$,!#e(B

e$B$`$7$me(Btime_te$B$NMQK!$rJq4^$7$?;EMM$K$9$Y$-$G!"@Z$j<N$F$k$Y$-$G$O$J$$!"$H$$$&e(B(e$B$=$3e(B
e$B$^$G6/$/$O8@$$$^$;$s$,e(B)e$B0U?^$G$7$?!#e(Btime_te$B$r@Z$j<N$F$J$$J}:v$H$7$F%5%V%/%i%92=$re(B
e$BDs0F$7$?$D$b$j$G$9!#<B8=@-$O$H$b$+$/!#e(B

e$BIwO$I_$r9-$2$k$H!"Nc30$C$F%m%8%C%/$N8m$j$r=hM}$9$k$N$K$O8~$$$F$$$k$1$I$b!“IT@5e(B
e$B$JCM$rDI@W$9$k$N$K$O8~$$$F$J$$$H;W$$$^$9!#B>$N8@8l$G$=$&$$$&$N$r$I$&=hM}$7$F$ke(B
e$B$+$H$$$&$H!“7?$G4hD%$C$F$$$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. removed_email_address@domain.invalid writes:

e$B%3%"$NCf$@$1$G8+$k$H$J$5$=$&$G$9$M!#3HD%%i%$%V%i%j$^$G8+$k$He(B
Zlib::GzipWriter#mtime=e$B$H$+!"$^$"$J$s$+$"$j$=$&$G$9!#$"$HB>$N%W%m%;%9$HDL?.$9$ke(B
e$B>l9g$Ke(Btime_te$B$rEG$/I,MW$,$"$kNc$O;W$$Ib$+$S$^$9$,!"$5$9$,$K$=$l$O$A$g$C$HJL$NOCe(B
e$B$+$J!#e(B

e$B$U$`!#$3$l$O0c$&$s$8$c$J$$$G$9$+e(B?

Zlib::GzipWriter#mtime= e$B$Oe(B gzip e$B%U%)!<%^%C%H$Ne(B mtime
e$B$r;XDje(B
e$B$9$k$b$N$G!“e(BRFC 1952 e$B$K$h$k$He(B MTIME e$B%U%#!<%k%I$Oe(B 4byte
e$B$G$9e(B
e$B$+$i!”$3$l$Oe(B OS e$B$Ne(B time_t e$B$N%5%$%:$K$h$i$:!"e(B32bit
e$B$J$s$8$c$Je(B
e$B$$$G$9$+e(B?

e$B$D$^$j!"e(B32bit time_t e$B$Je(B OS e$B$G$O0lCW$7$^$9$,!"e(B64bit
time_t e$B$Je(B
OS e$B$G$O0lCW$7$J$$$s$8$c$J$$$G$7$g$&$+!#e(B

e$B8DJL$N>u67$r6qBNE*$K8!F$$7$J$-$c$$$1$J$$>l9g$C$F$N$O$($F$7$F2?$+$N;EAH$_$,B-$je(B
e$B$F$J$$$H$-$J5$$,$7$^$9$,e(B…

e$B;d$N8+J}$H$7$F$O!"$3$NLdBj$OMQK!$K0MB8$7$^$9!#e(B

time_t e$B$H$7$F;H$&MQK!$,A4$F$J$N$+!"BgH>$J$N$+!“5)$J$N$+!”$He(B
e$B$$$&$3$H$G$9!#e(B

e$B$=$&$$$&MQK!$O30It$G7h$^$k$N$G!"e(BTime e$B%/%i%9<+BN$r$$$/$iD/$ae(B
e$B$F$b$o$+$i$:!"6qBNE*$K8!F$$7$J$1$l$P$J$i$J$$$N$O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9$H$7$Fe(Btime_te$B$J%/%i%9$rI=8=$9$k$N$,0lHV<+A3$@$H$Oe(B
e$B;W$$$^$9!#e(BFile.utimee$B$Oe(Btime_te$B$N$[$&$7$+<u$1IU$1$J$$$3$H$K$7$F!”%@%&%s%-%c%9%H$Oe(B
e$BL@<(E*$K$d$i$;$k$3$H$K$9$l$P!”%@%&%s%-%c%9%H$N%?%$%_%s%0$G7Y9p$r=P$7$?$jNc30$Ke(B
e$B$7$?$j$9$k$N$O!"JQ?t$rDI@W$9$k$h$j$OBgJ,4JC1$@$HA[A|$7$^$9!#e(B

e$B$^$:$O0z?t$K7?@k8@$r$D$1$J$$$H$$$1$^$;$s$M!#e(B
e$B$"$k$$$O7??dO@$KD)@o$9$k$+!#e(B

e$B$=$l$r<B8=$7$?8e$J$i!"%@%&%s%-%c%9%H$rK:$l$?$ie(B File.utime e$B$Ke(B
e$B$?$I$jCe$/A0$K8!=P$G$-$k$G$7$g$&!#e(B

e$B$H$3$m$Ge(B gzip e$B$Ne(B mtime e$B$NCM$rI=8=$9$k%/%i%9$b!"e(Btime_t
e$BMQ$N%/e(B
e$B%i%9$H$OJL$K:n$k$s$G$7$g$&$+!#e(B

e$B$=$l$,e(BRubye$B$C$]$$$+$O!"$A$g$C$H$J$s$H$bJ,$+$j$+$M$^$9$,!#e(B

e$B$+$J$j$"$-$i$+$Ke(B Ruby e$B$C$]$/$J$$$H$$$&%l%Y%k$KC#$7$F$$$k$H;We(B
e$B$$$^$9!#e(B


#19

In article removed_email_address@domain.invalid,
Urabe S. removed_email_address@domain.invalid writes:

    from -e:2:in `open'
    from -e:2:in `<main>'

zsh: exit 1 ruby -rzlib

e$B$3$l$,$I$&$J$k$Y$-$@$H$$$&OC$G$7$g$&$+!#e(B

RFC 1952 e$B$Ke(B MTIME e$B$Oe(B singed e$B$+e(B unsigned
e$B$+=q$$$F$J$$e(B (e$B$H;W$&e(B)
e$B$N$G!"e(B2147483648 e$B$KBP$7$I$&$$$&5sF0$,@5$7$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=P$5$J$1$l$P$J$i$J$$$H$$$&$N$O$?$7$+$K<j4V$,$+$+$j$^e(B
e$B$9!#e(B

e$B$G$9$,!"e(BFile.utime e$B$N$?$a$K;H$o$l$ke(B Time
e$B%*%V%8%’%/%H$O3d9ge(B
e$B$H$7$F$O>/$J$/!"Bg$-$JLdBj$G$O$J$$$N$G$O$J$$$G$7$g$&$+!#e(B

e$B$^$?!"$=$&$$$&J8L.$OK\Ev$K0BDj$7$F$$$k$N$+!"$H$$$&LdBj$,$"$je(B
e$B$^$9!#$"$k;~E@$G$=$l$,@5$7$$$H$7$F$b!"%W%m%0%i%`$,JQ2=$7$F$$e(B
e$B$/$&$A$KJQ$o$C$F$7$^$&$+$b$7$l$^$;$s!#e(B

e$B$^$?!"e(Butime e$B%7%9%F%%3!<%k$,;~9o$re(B time_t e$B$G<u$1IU$1$k$H$7$Fe(B e$B$b!"<B:]$N%U%!%$%k%7%9%F%$,$=$NHO0O$r$9$Y$F<u$1IU$1$k$+$H$$e(B
e$B$&$H$=$&$H$O8B$j$^$;$s!#$?$H$($P!"e(BNFS version 3 [RFC 1813]
e$B$Ne(B struct nfstime3 e$B$G$Oe(B uint32 seconds
e$B$H$$$&$3$H$G$9$+$i!"e(B
64bit time_t e$B$N4D6-$G$O$&$^$/$$$+$J$$$+$b$7$l$^$;$s!#;n$7$Fe(B
e$B$^$;$s$1$l$I!#$J$*!"e(BNFS version 4 [RFC 3530] e$B$Ne(B
struct nfstime4 e$B$G$Oe(B int64_t seconds e$B$N$h$&$G$9!#e(B

e$B$=$&$9$k$H!"$I$&$;3N<B$J8!::$Oe(B File.utime e$B$^$G$G$-$J$$$N$@$+e(B
e$B$iJ|$C$F$*$1$P$$$$!"$H$$$&8+J}$b$"$k$H;W$$$^$9!#e(B


#20

e$BKNIt$G$9!#e(B

Tanaka A. e$B$5$s$O=q$-$^$7$?e(B:

In article removed_email_address@domain.invalid,
Urabe S. removed_email_address@domain.invalid writes:

e$B$&!<$s!"$b$H$b$H$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