Date conversion error [message #2572] |
Wed, 30 June 2010 01:30 |
MadJik
Messages: 4 Registered: June 2010
|
Junior Member |
|
|
Hi,
I've choosen the date format "DD/MM/YY" in config.inc:
$GLOBALS['date_format'] = 'dd/mm/yy'; // '21/06/01'
I've created a new user and I've tried to update it when I've got the message:
This application has encountered an unrecoverable error
The following has been reported to the administrator:
2010-06-30 07:23:31
Fatal Error: Uncaught exception fron Exception, message = DateTime::__construct() [datetime.--construct]: Failed to parse time string (30/06/10 07:23:11) at position 0 (3): Unexpected character (# 256).
Error in line 377 of file 'C:\xampp\htdocs\radicore\includes\error.inc'.
PHP_SELF: /radicore/menu/mnu_user(upd1).php
SERVER_ADDR: 127.0.0.1
SERVER_NAME: localhost
HTTP_HOST: localhost
User Id: MGR
REMOTE_ADDR: 127.0.0.1
REQUEST_URI: /radicore/menu/mnu_user(upd1).php?session_name=menu0
It seems the 3 of 30/06/10 is unexpected...
For now I will use another date format.
Thanks.
/MadJik
|
|
|
Re: Date conversion error [message #2574 is a reply to message #2572] |
Wed, 30 June 2010 06:37 |
AJM
Messages: 2363 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
DateTime::__construct() is only ever called when the user's timezone is different from the server timezone.
After setting $GLOBALS['date_format'] to 'dd/mm/yy' and creating a new user on 30-06-2010 I played around with various updates to see what happened. I could never get it to abort, but I did get some invalid dates. See if the update in the attached file fixes your problem.
What version of PHP are you using? What timezones?
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
|