--- loncom/interface/loncommon.pm 2006/05/11 19:04:31 1.369 +++ loncom/interface/loncommon.pm 2006/05/12 02:17:50 1.370 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.369 2006/05/11 19:04:31 www Exp $ +# $Id: loncommon.pm,v 1.370 2006/05/12 02:17:50 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2606,6 +2606,14 @@ sub timehash { 'dlsav' => $ltime[8] ); } +sub utc_string { + my ($date)=@_; + my @utctime=gmtime($date); + my $year=$utctime[5]+1900; + my $month=$utctime[4]+1; + return "$year$month$utctime[3]T$utctime[2]$utctime[1]$utctime[0]Z"; +} + sub maketime { my %th=@_; return POSIX::mktime(