Re: time function

2004-09-20 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: I was wondering if I can get some help on this. I a function to which I pass the current time. Let's call it func. I call it as follows: $joe = func(time); Now how do I use "time" but add one minute to it? For instance since time will give me the current time, how do I tell

Re: time function

2004-09-20 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: Greetings earthlings, Hello, I was wondering if I can get some help on this. I a function to which I pass the current time. Let's call it func. I call it as follows: $joe = func(time); Now how do I use "time" but add one minute to it? For instance since time will perl -e '

RE: time function

2002-01-16 Thread Peter Cornelius
Ooo. I've never used this. It sure looks better than parsing the date out yourself. Peter C. -Original Message- From: Hanson, Robert [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 10:21 AM To: Roy Peters Cc: [EMAIL PROTECTED] Subject: RE: time function You could

RE: time function

2002-01-16 Thread Peter Cornelius
To convert *to* seconds since the epoch you want the timelocal() function. It's part of the Time::Local standard module and takes input in the form of localtime's output. From 'perldoc Time::Local' use Time::Local; $time = timelocal($sec,$min,$hours,$mday,$mon,$year); so a comp

RE: time function

2002-01-16 Thread Hanson, Robert
oy Peters Cc: [EMAIL PROTECTED] Subject: Re: time function On Jan 16, Roy Peters said: >I need someone to tell me the function that will convert time in this >format to epoch time: 1/17/2002 11:15 AM If localtime() isn't good enough for you, then perhaps you'll want to use the POS

Re: time function

2002-01-16 Thread Jeff 'japhy' Pinyan
On Jan 16, Roy Peters said: >I need someone to tell me the function that will convert time in this >format to epoch time: 1/17/2002 11:15 AM If localtime() isn't good enough for you, then perhaps you'll want to use the POSIX strftime() function, or you could hand-roll a solution. my ($min, $h