[LON-CAPA-cvs] cvs: nsdl /lib/perl/Apache/GATEWAY Common.pm

harris41 lon-capa-cvs@mail.lon-capa.org
Thu, 30 May 2002 17:04:42 -0000


harris41		Thu May 30 13:04:42 2002 EDT

  Modified files:              
    /nsdl/lib/perl/Apache/GATEWAY	Common.pm 
  Log:
  computing responseDate in correct format
  
  
Index: nsdl/lib/perl/Apache/GATEWAY/Common.pm
diff -u nsdl/lib/perl/Apache/GATEWAY/Common.pm:1.1 nsdl/lib/perl/Apache/GATEWAY/Common.pm:1.2
--- nsdl/lib/perl/Apache/GATEWAY/Common.pm:1.1	Tue May 28 21:00:18 2002
+++ nsdl/lib/perl/Apache/GATEWAY/Common.pm	Thu May 30 13:04:42 2002
@@ -15,6 +15,14 @@
 
 package Apache::GATEWAY::Common;
 
+use Date::Format;
+
+sub responseDate {
+    my $responseDate=Date::Format::time2str("%Y-%m-%dT%T%z",time);
+    $responseDate=~s/(..)$/\:$1/;
+    return $responseDate;
+}
+
 sub readCGI {
     my $r=shift;
 # -------------------------------------------------------- Load POST parameters