ソースを参照

Fixed a bug where inserting an analysis will fail if the postgres datestyle setting is not MDY.

spficklin 14 年 前
コミット
71e8d6c55a
1 ファイル変更5 行追加0 行削除
  1. 5 0
      tripal_core/tripal_core.module

+ 5 - 0
tripal_core/tripal_core.module

@@ -57,6 +57,11 @@ function tripal_core_init(){
       var baseurl = '$base_url'; 
       var themedir = '$theme_dir'; 
       var isClean = $clean_urls;",'inline');
+
+   // make sure the date time settings are the way Tripal will insert them
+   // otherwise PostgreSQL version that may have a different datestyle setting
+   // will fail when inserting or updating a date column in a table.
+   db_query("SET DATESTYLE TO '%s'",'MDY');
 }