RE: Scalar Localtime

2001-12-16 Thread Peter Cornelius
I can think of lots of times the output of 'time()' has been just what I needed. For example, anytime you want to compare times, like my $timeout = time() + $sec_to_alarm; do { #stuff } until (time() > $timeout); Or to compare dates $date = timelocal(@user_supplied_date); $now = time(); if ($

Re: Scalar Localtime

2001-12-15 Thread Jonathan E. Paton
> I have a question. Why is it that I have to use 'scalar > localtime' to view a datetime in the proper format. > Why would I want to use the weird UNIX format that I > can't read? You don't, but Perl isn't stupid enough to impliement several dozen ways of displaying the date... not in the langua

Re: Scalar Localtime

2001-12-15 Thread Michael R. Wolf
"Michael Pratt" <[EMAIL PROTECTED]> writes: > I have a question. Why is it that I have to use Scalar localtime to view a > datetime in the proper format. why would I want to use the weird UNIX format > that I cant read? If you want to manipulate the parts separately: my @slice = (I don't re

Re: Scalar Localtime

2001-12-15 Thread Jeff 'japhy' Pinyan
On Dec 15, Michael Pratt said: >I have a question. Why is it that I have to use Scalar localtime to view a >datetime in the proper format. why would I want to use the weird UNIX format >that I cant read? time() returns the number of seconds since 1970 -- I certainly can't divine the current date

Re: Scalar Localtime

2001-12-15 Thread Michael Pratt
I do like UNIX. I was just wondering what type of program would you write to use that type of UNIX format? Mike "Jonathan e. paton" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I have a question. Why is it that I have to use 'scalar > > localtime' to vie