The format for $app_date that you give appears to be month-day-year (or day-month-year—I can't tell which), but your code thinks it's year-month-day. I think your second line down should be:
($amonth,$aday,$ayear) = split(/-/, $adate);
Pulling those fields out of your input might be a little more readable with regular expressions. You could replace all of your split lines with this (unless you need $adate or $atime later):
( $amonth, $aday, $ayear, $ahour, $amin, $asec ) = ( $app_date =~ /^(\d\d?)-(\d\d?)-(\d{4}) (1?\d):(\d\d):(\d\d)/ ) +;
Or this, if you're into xms regexes:
( $amonth, $aday, $ayear, $ahour, $amin, $asec ) = ( $app_date =~ m{ \A # beginning of string (\d\d?)-(\d\d?)-(\d{4}) # month-day-year \s # space separator (1?\d):(\d\d):(\d\d) # hour:minutes:seconds }xms );
In reply to Re: Time local
by kyle
in thread Time local
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |