[system] / branches / gage_dev / webwork2 / lib / WeBWorK / Utils.pm Repository:
ViewVC logotype

Diff of /branches/gage_dev/webwork2/lib/WeBWorK/Utils.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1491 Revision 1492
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
104sub parseDateTime($) { 104sub 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
109sub writeLog($$@) { 111sub writeLog($$@) {
110 my ($ce, $facility, @message) = @_; 112 my ($ce, $facility, @message) = @_;

Legend:
Removed from v.1491  
changed lines
  Added in v.1492

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9