From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: To: community@altlinux.ru Subject: Re: [Comm] perl References: <39212803.20050601165030@mail.ru> <429DB67C.6090502@ricom.ru> Message-ID: Date: Thu, 02 Jun 2005 08:26:40 +0400 From: "Aleksander N. Gorohovski" Organization: DonNTU Content-Type: text/plain; format=flowed; delsp=yes; charset=koi8-r MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In-Reply-To: <429DB67C.6090502@ricom.ru> User-Agent: Opera M2/7.54 (Linux, build 751) X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: community@altlinux.ru List-Id: Mailing list for ALT Linux users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2005 05:38:22 -0000 Archived-At: List-Archive: List-Post: On Wed, 01 Jun 2005 17:22:04 +0400, Alexey Morsov wrote: > > Anton Gorlov wrote: >> Здравствуйте, community. >> >> Э... man что и на предмет чего... что б дату из "time" (1117632255) >> перевести в более человеческое. perl > > ($sec, $min, $hour, $day, $mon, $year, $wday, $yday, $isdst) > = localtime($_[0]); > > if (length($day) == 1) { $day ='0'.$day; } > if (length($mon) == 1) { $mon ='0'.++$mon; } > if (length($min) == 1) { $min ='0'.$min; } > if (length($sec) == 1) { $sec ='0'.$sec; } > else { $mon++; } Sorry, $mon++; for($day,$mon,$min,$sec){ $_="0$_" if length($_) == 1 } :-) > > $year += 1900;