Newsgroups: fj.lang.perl
Path: galaxy.trc.rwcp.or.jp!coconuts.jaist!wnoc-tyo-news!wnoc-sfc-news!wnoc-kyo-news!kuis-news!kuee-news!odins-suita!itserv.it.okayama-u.ac.jp!elecnews!libero!yama
From: yama@biotech.okayama-u.ac.jp (Mamoru Yamanishi)
Subject: Re: [Q]How to convert date to time_t?
Sender: news@plasma.elec.okayama-u.ac.jp
Message-ID: <yama-2703971012430001@libero.biotech.okayama-u.ac.jp>
Date: Thu, 27 Mar 1997 01:12:43 GMT
Content-Type: text/plain; charset=iso-2022-jp
References: <33394ECD.77CF@ec.ecei.tohoku.ac.jp>
Nntp-Posting-Host: libero.biotech.okayama-u.ac.jp
Mime-Version: 1.0
Organization: Okayama University
X-Newsreader: NewsWatcher-J 2.0J16
Lines: 27
Xref: galaxy.trc.rwcp.or.jp fj.lang.perl:1851
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.lang.perl&nb=1851&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

>$B$I$J$?$+!"(Bdate -> time_t $B$NJQ49%k!<%A%s!JF|;~$rF~$l$k$H(B 1970/01/01 
>00:00:00 $B$+$i$N7P2a;~4V!JIC!K$rJV$9!K$r$4B8$8$"$j$^$;$s$+!)(B
>$BMW$9$k$K!"(Blocaltime ( time_t ) $B$N5U$NF0:n$G$9!#(B

Perl4$B$G$N=q$-J}$7$+CN$j$^$;$s$,!"(B

   require "timelocal.pl";

   &timelocal($sec, $min, $hour, $day, $month, $year);
   &timegm($sec, $min, $hour, $day, $month, $year);

$B$,$4=jK>$N$b$N$G$O$J$$$G$7$g$&$+!#(B

$B%i%/%@K\$N!VIUO?#B!W$r$4;2>H$/$@$5$$!#(B

$B$J$*!"0z?t$NItJ,$GCm0U$7$J$1$l$P$J$i$J$$$N$O!"0l7n$J$i(B
$month==0$B$G$9!#(B

>$B!t(Bperl $BI8=`$G$"$k!)(B

$B4X?t$G$O$J$/$F%i%$%V%i%j!<$H$7$F!"$?$$$F$$$N$b$N$K%$%s%W%j%a%s%H$5$l$F(B
$B$$$k$H;W$o$l$^$9!#4p=`F|$,0[$J$j$^$9$,(BMacPerl$B$K$b$"$j$^$9!#(B

-- 
Mamoru Yamanishi
Biotech. Dept., Okayama Univ.
<yama@biotech.okayama-u.ac.jp>
