Dear monks,
Let's say I have a date / time parsed out in a bunch of variables:
if( $time =~ m/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})(Z?)$/ ) {
( $year, $month, $day, $hour, $min, $sec, $is_gmt ) =
( $1, $2, $3, $4, $5, $6, $7 );
}
Is there a shortcut to turn these into a value as returned by
time(), i.e. number of seconds since the epoch? So that I can do numerical comparisons on the dates, and then format them back into something pretty using
localtime() or the POSIX
strftime function?
Thanks!