[LON-CAPA-cvs] cvs: loncom /metadata_database/LONCAPA lonmetadata.pm
droeschl
droeschl at source.lon-capa.org
Tue Mar 6 16:48:28 EST 2012
droeschl Tue Mar 6 21:48:28 2012 EDT
Modified files:
/loncom/metadata_database/LONCAPA lonmetadata.pm
Log:
Bug 6566: convert unix timestamp to sql time before insert into database if the field is of type datetime.
Index: loncom/metadata_database/LONCAPA/lonmetadata.pm
diff -u loncom/metadata_database/LONCAPA/lonmetadata.pm:1.33 loncom/metadata_database/LONCAPA/lonmetadata.pm:1.34
--- loncom/metadata_database/LONCAPA/lonmetadata.pm:1.33 Tue May 31 14:45:53 2011
+++ loncom/metadata_database/LONCAPA/lonmetadata.pm Tue Mar 6 21:48:28 2012
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonmetadata.pm,v 1.33 2011/05/31 14:45:53 raeburn Exp $
+# $Id: lonmetadata.pm,v 1.34 2012/03/06 21:48:28 droeschl Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -463,7 +463,8 @@
$mdata->{$fname} eq '') {
push(@MData,'NULL');
} else {
- push(@MData,$mdata->{$fname});
+ push(@MData, $field->{type} eq 'DATETIME' ?
+ sqltime($mdata->{$fname}) : $mdata->{$fname});
}
} else {
push(@MData,undef);
More information about the LON-CAPA-cvs
mailing list