2013-03-12 88 views
1

我正在顯示一個包含DATETIME值的表。雖然值正確顯示,但是一旦編輯了datetime值,它將自動轉換爲jqgrid和數據庫中的「1999-11-30 00:00:00」日期,無論日期寫入了什麼日期。jqgrid的日期只設置爲1999-11-30 00:00:00

[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined offset: -1 in /var/www/html/testing/tables/php/jqGrid.php on line 3922, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined offset: 0 in /var/www/html/testing/tables/php/jqGrid.php on line 3980, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined offset: 0 in /var/www/html/testing/tables/php/jqGrid.php on line 3980, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined offset: 0 in /var/www/html/testing/tables/php/jqGrid.php on line 3980, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined offset: 0 in /var/www/html/testing/tables/php/jqGrid.php on line 3980, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined offset: 0 in /var/www/html/testing/tables/php/jqGrid.php on line 3980, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined offset: 0 in /var/www/html/testing/tables/php/jqGrid.php on line 3980, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined index: F in /var/www/html/testing/tables/php/jqGrid.php on line 3981, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined index: M in /var/www/html/testing/tables/php/jqGrid.php on line 3982, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined index: n in /var/www/html/testing/tables/php/jqGrid.php on line 3984, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined index: j in /var/www/html/testing/tables/php/jqGrid.php on line 3986, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined index: o in /var/www/html/testing/tables/php/jqGrid.php on line 3988, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined index: y in /var/www/html/testing/tables/php/jqGrid.php on line 3989, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined index: l in /var/www/html/testing/tables/php/jqGrid.php on line 3990, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined index: D in /var/www/html/testing/tables/php/jqGrid.php on line 3991, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined index: N in /var/www/html/testing/tables/php/jqGrid.php on line 3992, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined index: w in /var/www/html/testing/tables/php/jqGrid.php on line 3993, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined variable: month in /var/www/html/testing/tables/php/jqGrid.php on line 3994, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined variable: day in /var/www/html/testing/tables/php/jqGrid.php on line 3994, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined variable: year in /var/www/html/testing/tables/php/jqGrid.php on line 3994, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined index: G in /var/www/html/testing/tables/php/jqGrid.php on line 3996, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined index: h in /var/www/html/testing/tables/php/jqGrid.php on line 3997, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined index: g in /var/www/html/testing/tables/php/jqGrid.php on line 3998, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined index: O in /var/www/html/testing/tables/php/jqGrid.php on line 3999, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined index: Z in /var/www/html/testing/tables/php/jqGrid.php on line 4000, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined variable: year in /var/www/html/testing/tables/php/jqGrid.php on line 4006, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined variable: month in /var/www/html/testing/tables/php/jqGrid.php on line 4007, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined variable: day in /var/www/html/testing/tables/php/jqGrid.php on line 4008, referer:--------------------users.php 
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice: Undefined variable: hour in /var/www/html/testing/tables/php/jqGrid.php on line 4010, referer:--------------------users.php 

什麼可能導致這樣的問題?

我沒有使用jqgrid的datepicker插件(或任何其他插件)。

我嘗試使用AJAX來手動更新數據庫中的值時,提交按鈕觸發事件

$grid->setNavEvent('edit', 'onclickSubmit', $updateDate); 

但似乎手動更新正由jqGrid的更新覆蓋。

什麼可能導致錯誤的日期?

回答

1

$ grid-> setUserTime(「Y-m-d H:i:s」);

乾杯。

+1

是的,它的工作!謝謝!驚人的一行可以做! – Gabriel 2013-03-12 12:17:31