[Israel.pm] time of pc

Mike Freedman michael.freedman at gmail.com
Thu Jun 22 00:24:59 PDT 2006


Yeah - date::calc is one of my faves, I use it often!  

-----Original Message-----
From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On Behalf
Of rami doqa
Sent: 22 June 2006 08:20
To: Perl in Israel
Subject: Re: [Israel.pm] time of pc

hello, to do that u need to write the following code:
 
my @time = localtime(time());
           
my $second = $time[0];
my $minute = $time[1];
my $hour = $time[2];

my $day = $time[3];
my $month = $time[4]+1;
my $year = $time[5]+1900;

after that u can join the formate u want to view
 
or use date::calc on CPAN

--- "Ernst, Yehuda" <yernst at nds.com> wrote:

> Hello!
> 
> How do i show the time (clock) of my pc in perl?
> 
> i tried localtime but i could not parse it.
> 
> Thanks
> 
> Yehuda Ernst                        יהודה
> ארנסט
> NDS Technologies Israel Ltd. mailto:yernst at nds.com>
> Jerusalem          Tel:  +972 (2) 589-4427
> PO Box 23012    Fax: +972 (2) 589-4825
> Israel.    91235    Cell  +972 54 5664427
> 
>
****************************************************************************
*******
> This email message and any attachments thereto are intended only for 
> use by the addressee(s) named above, and may contain legally 
> privileged and/or confidential information. If the reader of this 
> message is not the intended recipient, or the employee or agent 
> responsible to deliver it to the intended recipient, you are hereby 
> notified that any dissemination, distribution or copying of this 
> communication is strictly prohibited. If you have received this 
> communication in error, please immediately notify the 
> postmaster at nds.com and destroy the original message.
>
****************************************************************************
*******
> 
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com _______________________________________________
Perl mailing list
Perl at perl.org.il
http://perl.org.il/mailman/listinfo/perl





More information about the Perl mailing list