jDownloads Support Forum

Older Versions => jDownloads 3.2 (Support ended) => General => Topic started by: tkuhrt on 27.04.2015 20:12:22

Title: DateTime::__construct(): ERROR What to do?
Post by: tkuhrt on 27.04.2015 20:12:22
Suddenly now when I click Files in the admin I get this message:

0 DateTime::__construct(): Failed to parse time string (03-16-2015) at position 0 (0): Unexpected character

What do I do now?

3.2.28 Beta jDownloads - content at the moment.

Title: Re: DateTime::__construct(): ERROR What to do?
Post by: ColinM on 29.04.2015 18:09:20
Hi
Obviously my first response is to suggest you update to the latest version.  There were some changes with the way jD handled dates and times for international sites.

However note the message
QuoteFailed to parse time string (03-16-2015)
the - character is not a valid symbol in a time string, it is however  used in date strings.
Have you modified either Long Date-Time format or Short- Date-Time format in Config - Downloads tab?

Or more likely have you changed a Created or Modified date/time in a Download

To force an error I overwrote a Create date-time string from 2015-01-30 22:49:00 to 2015-01-30 22-49-00 and got error message as below
DateTime::__construct(): Failed to parse time string (2015-01-30 22-49-00) at position 11 (2): Unexpected character
Did another one using a # charachter as below
DateTime::__construct(): Failed to parse time string (2$015-01-30 22:07:45) at position 0 (2): Unexpected character

In my case jD automatically 'repaired' things

So I think you have a date in a Download that has some nonprinting character at the start.  So use backend to find Downloads with the date concerned.

Colin
Title: Re: DateTime::__construct(): ERROR What to do?
Post by: tkuhrt on 29.04.2015 20:00:35
Thank you for your time.

I found a pdf file that was not in any directory under jdownlaods. I removed it and everything is fine. Not sure why that happened.
THX!

What are the steps to upgrading from 3.2.28 Beta to 3.2.31 I only see 1.9 to 3.2.



Title: Re: DateTime::__construct(): ERROR What to do?
Post by: ColinM on 30.04.2015 11:51:59
Hi
Glad your problem was sorted.

To go to higher version you just go through the same as a normal Install.  When jD, like many components, is installed it checks to see if there is an existing version and if there is it installs as as an 'update' rather than as a 'fresh' install.  Maybe I should add into the documentation.

Colin
PS This was not a jD 'bug' so I have moved to General
Title: Re: DateTime::__construct(): ERROR What to do?
Post by: tkuhrt on 30.04.2015 14:17:38
I have the latest Joomla and I'm running 3.2.28 Beta jdownloads. It is not showing a newer version even when I hit discover. Just a note.

Thx for your time
Title: Re: DateTime::__construct(): ERROR What to do?
Post by: ColinM on 30.04.2015 17:17:40
Hi
Arno has not yet had time to get the Joomla! 'discover' part operational.  Just download latest version from www.jDownloads.com and install as usual (http://www.jdownloads.net/documentations/item/how-to-install-update)
Colin