| … | |
… | |
| 95 | # %d numeric day of the month, with leading zeros (eg 01..31) |
95 | # %d numeric day of the month, with leading zeros (eg 01..31) |
| 96 | # %y year (2 digits) |
96 | # %y year (2 digits) |
| 97 | # %I hour, 12 hour clock, leading 0's) |
97 | # %I hour, 12 hour clock, leading 0's) |
| 98 | # %M minute, leading 0's |
98 | # %M minute, leading 0's |
| 99 | # %P am or pm (Yes %p and %P are backwards :) |
99 | # %P am or pm (Yes %p and %P are backwards :) |
| 100 | #return time2str("%m/%d/%y %I:%M%P", $dateTime); |
100 | #return time2str("%m/%d/%y %I:%M%P", $dateTime); |
| 101 | return time2str("%m/%d/%y at %I:%M%P", $dateTime); |
101 | return time2str("%m/%d/%y at %I:%M%P", $dateTime); |
| 102 | } |
102 | } |
| 103 | |
103 | |
| 104 | sub parseDateTime($) { |
104 | sub parseDateTime($) { |
| 105 | my $string = shift; |
105 | my $string = shift; |
|
|
106 | # need to bring our string from "%m/%d/%y at %I:%M%P" to "%m/%d/%y %I:%M%P" format. |
|
|
107 | $string =~ s/\bat\b/ /; |
| 106 | return str2time($string); |
108 | return str2time($string); |
| 107 | } |
109 | } |
| 108 | |
110 | |
| 109 | sub writeLog($$@) { |
111 | sub writeLog($$@) { |
| 110 | my ($ce, $facility, @message) = @_; |
112 | my ($ce, $facility, @message) = @_; |