in reply to Re^8: Comparing Dates
in thread Comparing Dates
I don't know much about database dates, but if you can get it from the database as a number instead of as a string, it would be more reliable and faster.sub get_time_from_local_time_string { my ($time_string) = @_; my ($M, $D, $Y, $h, $m, $s) = $time_string =~ m{(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)}; return timelocal($s, $m, $h, $D, $M-1, $Y); }
|
|---|