500 - DateTime::__construct() [datetime.--construct]

General questions regarding the use of languages in Joomla! 2.5.

Moderators: infograf768, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
suttie
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 143
Joined: Mon Aug 24, 2009 5:05 am

500 - DateTime::__construct() [datetime.--construct]

Post by suttie » Wed Oct 17, 2012 12:02 am

I use the latest version of joomla. I have installed K2 and there is some issue with datetime on the items. Also there is an error page when users try to add a post

Code: Select all

500 - DateTime::__construct() [datetime.--construct]: Failed to parse time string (17/10/2012 10:56:06) at position 0 (1): Unexpected character 
I did a lot of research on the subject and this issue is not uncommon. it seems to be related with a multilanguage site due the different timezone.

Often it occurs with some extensions but I'm not sure if the issue can be solved in joomla system or have to work in the extension.

I didn't fnd any solution on my research

suttie
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 143
Joined: Mon Aug 24, 2009 5:05 am

Re: 500 - DateTime::__construct() [datetime.--construct]

Post by suttie » Thu Oct 18, 2012 1:58 am

I need some help with this issue. I found lots of questions about this but no solutions.
However the issue is related to the extension I think there is some rules for timezone in joomla system that would help.
I already checked the php information at the hosting and everything is ok.

suttie
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 143
Joined: Mon Aug 24, 2009 5:05 am

Re: 500 - DateTime::__construct() [datetime.--construct]

Post by suttie » Sun Oct 28, 2012 6:45 am

At last I discovered the solution for this issue. I'm posting here in case somebody else has the same problem.
There is an error in the language translation. You have to change the date format at the file

Code: Select all

administrator\language\pt-BR\pt-BR.com_k2.ini
Change this original

Code: Select all

K2_J16_DATE_FORMAT="d/m/Y - H:i"

K2_J16_DATE_FORMAT_CALENDAR="d/m/Y H:i:s"

K2_J16_DATE_FORMAT_LC2="l, d F Y H:i"

K2_J16_DATE_FORMAT_LC="l, d F Y"
For this

Code: Select all

K2_J16_DATE_FORMAT="d-[URL banned] H:i"


K2_J16_DATE_FORMAT_CALENDAR="d-[URL banned] H:i"


K2_J16_DATE_FORMAT_LC2="d-[URL banned] H:i"


K2_J16_DATE_FORMAT_LC="d-[URL banned] H:i"
I found the solution in www.joomlaclube.com.br

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18871
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: 500 - DateTime::__construct() [datetime.--construct]

Post by infograf768 » Mon Oct 29, 2012 6:21 am

I suggest you let this know to K2 people.
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

suttie
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 143
Joined: Mon Aug 24, 2009 5:05 am

Re: 500 - DateTime::__construct() [datetime.--construct]

Post by suttie » Mon Oct 29, 2012 7:36 am

Yeah, I also post in their forum

User avatar
DJsOak4
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 172
Joined: Thu Feb 18, 2010 5:11 pm

Re: 500 - DateTime::__construct() [datetime.--construct]

Post by DJsOak4 » Sun Dec 23, 2012 8:56 pm

In my case, I do not have K-2 installed and in Administrator/Languages, there is no pt-BR, there is en-GB, override and index and none of those have an extension as you mention. Any other ideas, please?

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18871
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: 500 - DateTime::__construct() [datetime.--construct]

Post by infograf768 » Mon Dec 24, 2012 7:09 am

DJsOak4 wrote:In my case, I do not have K-2 installed and in Administrator/Languages, there is no pt-BR, there is en-GB, override and index and none of those have an extension as you mention. Any other ideas, please?
Please first describe your issue and ways to reproduce.
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
DJsOak4
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 172
Joined: Thu Feb 18, 2010 5:11 pm

Re: 500 - DateTime::__construct() [datetime.--construct]

Post by DJsOak4 » Mon Dec 24, 2012 2:01 pm

I sure appreciate any help you can give. I posted the following at http://forum.joomla.org/viewtopic.php?f=622&t=729865 but haven't had a response. I won't re-post the screen shot here, but it is in the other post if you want to look at it. I've been searching for this error re: Joomla and/or the specific templates to no avail so far as to something that works.

This error occurs on two RocketTheme templates (Radiance and Infuse), but not a template from another provider. If you “forget password” and go through all the hoops to where you can once again log in, you get this error: 500 - DateTime::__construct() [datetime.--construct]: Failed to parse time string (%2055-%07-%26) at position 0 (%): Unexpected character with a screen shot like the one attached. If you backspace the url to the site, it does log you in. I discussed what humvee said with our host and he said if it was a problem on the server end, it would be on many sites. The site with the problem is http://www.yahwehschildren.com and the one without the problem is http://www.yaim.org. I compared php information and the php.ini files and they are the same. Can anyone help?

kelsen12
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Sep 17, 2013 6:46 pm

Re: 500 - DateTime::__construct() [datetime.--construct]

Post by kelsen12 » Tue Sep 17, 2013 6:50 pm

Thank you dear friend, solved my problems :D

Alberto_7721
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Nov 26, 2015 9:04 am

Re: 500 - DateTime::__construct() [datetime.--construct]

Post by Alberto_7721 » Thu Nov 26, 2015 9:10 am

In my case the solution is the follow:
I created in k2 extra fields in date format. If you don't fill these fields with a date or if you fill different data (es: missing, ecc..) you will have the error. Instead if you fill with a date works fine.


Locked

Return to “Language - Joomla! 2.5”