in reply to Re^2: Time::ParseDate issues
in thread Time::ParseDate issues

parsedate($hour.":".$min.":00"))

should give the same number of seconds,(since Jan 1, 1970), as:

my $now = time; $now -= ($now % 60);

I say should because I don't know if the function parsedate gives seconds since the epoch when only supplied the time numbers (and not the date numbers).

What his code is doing is removing any seconds (> 00)

Chris

Replies are listed 'Best First'.
Re^4: Time::ParseDate issues
by Conal (Beadle) on Nov 29, 2008 at 07:14 UTC
    Yes Time::ParseDate does resolve to the number of seconds since jan 1 1970, even if only hours and minutes and seconds are sent to the function.

    'The return code is always the time in seconds since January 1st, 1970 or undef if it was unable to parse the time.'

    http://search.cpan.org/~muir/Time-modules-2003.0211/lib/Time/ParseDate.pm#DESCRIPTION

    I believe thats it pretty much sussed now. thanks everyone ever so much. its much appreciated.
    conal.