1

我正在显示一个包含 DATETIME 值的表。尽管值显示正确,但一旦编辑了 datetime 值,它会自动转换为“1999-11-30 00:00:00”日期,无论是在 jqgrid 还是在数据库中,无论写入什么日期。

[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 更新所覆盖。

什么可能导致错误的日期?

4

1 回答 1

1

$grid->setUserTime("Ymd H:i:s");

干杯。

于 2013-03-12T12:16:57.390 回答