×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: DateTime::__construct()

DateTime::__construct() 8 years 5 months ago #32753

  • Miika Toivonen
  • Miika Toivonen's Avatar Topic Author
  • Away
  • Senior Boarder
  • Senior Boarder
  • Posts: 42
  • Thank you received: 1
Hello,
I have Joomla 3.4.5 and Matukio 5.2.7 installed.
I try to edit an event but I get this:

An error has occurred.
0 DateTime::__construct(): Failed to parse time string (Valid from) at position 0 (V): The timezone could not be found in the database

This happens both front and backend. I guess some small fix in some php file would solve this, but which one?
Br,
Miika

DateTime::__construct() 8 years 5 months ago #32755

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Miika, You are not using the correct syntax for your dates.

Look at the example here php.net/manual/en/function.date.php - you need to escape your characters. So from "valid to" you would have something like "\v\a\l\i\d \t\o"

Regards,
Daniel

DateTime::__construct() 8 years 5 months ago #32765

  • Miika Toivonen
  • Miika Toivonen's Avatar Topic Author
  • Away
  • Senior Boarder
  • Senior Boarder
  • Posts: 42
  • Thank you received: 1
Hi,

I don't know what have I done differently. This has been working ok earlier. Please see the attached picture, are those date/time formats not ok?

Br,
Miika
Attachments:

DateTime::__construct() 8 years 5 months ago #32772

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Is the page loading? If it is and you see the date in the expecte format, then it is :) For me it seems to work.
I got this as a result:

Monday, 13. November 2017 alkaen 14:00 till 17:00


Regards,
Daniel

DateTime::__construct() 8 years 5 months ago #32784

  • Miika Toivonen
  • Miika Toivonen's Avatar Topic Author
  • Away
  • Senior Boarder
  • Senior Boarder
  • Posts: 42
  • Thank you received: 1
The output works ok, that was not the problem. The original problem was that when I click an excisting event to edit it, it gives me the error message I mentioned.

Br,
Miika

DateTime::__construct() 8 years 5 months ago #32786

  • Yves Hoppe
  • Yves Hoppe's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 3519
  • Karma: 71
  • Thank you received: 556
Did you change the default begin / end time in the Matukio settings (Default values). This has to match the "normal" scheme too 14:00:00 etc.

Kind regards,
Yves

DateTime::__construct() 8 years 5 months ago #32793

  • Miika Toivonen
  • Miika Toivonen's Avatar Topic Author
  • Away
  • Senior Boarder
  • Senior Boarder
  • Posts: 42
  • Thank you received: 1
No, I did not change those. They're all in 14:00:00 format.

Br,
Miika

DateTime::__construct() 8 years 5 months ago #32810

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Miika you have entered wrong date format somewhere. And this somewhere is most probably in the settings.

If you haven't changed too many things in the settings, than maybe a good thing would be a setting reset -> this way you would start with standard settings and the error should go away (if it is caused by the settings). If it isn't then we would need access to the site to look further at this.

Regards,
Daniel
  • Page:
  • 1
Time to create page: 0.132 seconds