- Posts: 9
COMMUNITY FORUM
Error: Double timezone specification
- Paul Andrews
-
Topic Author
- Offline
- New Member
A site I have recently updated to Joomla 3.7 has an error I have not seen before. When saving certain existing items are edited and saved, the following error displays:
0 DateTime::__construct(): Failed to parse time string (-1-11-30 00:00:00) at position 5 (-): Double timezone specification
Other items save fine. I am yet to determine what difference if any between the ones that will save and those that won't.
Everything is up to date, using php 7.1
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Can you enable error reporting or take a look at the error_log to see which file(s) are producing this error?
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Reaction
-
- Offline
- New Member
- Posts: 5
Looks like when we updated the "publish" date field wiped throughout all of our K2 items and now that field is zeroed out in the database (all the items in joomla shows Jan 12, 2017). Until you edit the published date, the item will continuously throw this error on save.
We're not in a spot where we can wait for a solution so we're just going to drop a number into that field for all of our items to prevent the errors, but for someone who is using the publishing date, that wouldn't be a good solution.
Note:
Error logs have nothing related to this error
Maximum reporting does not show additional errors
Please Log in or Create an account to join the conversation.
- Reaction
-
- Offline
- New Member
- Posts: 5
Please Log in or Create an account to join the conversation.
- Reaction
-
- Offline
- New Member
- Posts: 5
temp fix line 139 of `administrator/components/com_k2/models/item.php`
if (!(bool) strtotime($row->publish_up)) {
$row->publish_up = '0000-00-00 00:00:00';
}
Hopefully that helps.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Reaction
-
- Offline
- New Member
- Posts: 5
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Steven Trooster
-
- Offline
- Premium Member
- Posts: 130
I'm getting the same error here. An editor adds an article through the frontend of my site. When the article is edited in the admin, the above error is produced when trying to save changes.
When I look at the database I see that the items created in the frontend have a wrong 'created' value (0000-00-00 00:00:00). Apparently there is no creation date stored in the frontend.
Joomla 3.7.3 and K2 2.7.1
Please Log in or Create an account to join the conversation.
- Steven Trooster
-
- Offline
- Premium Member
- Posts: 130
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
github.com/getk2/k2
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- The Rock Father
-
- Offline
- New Member
- Posts: 1
DateTime::__construct(): Failed to parse time string (-1-11-29 18:00:00) at position 5 (-): Double timezone specification
I'm running K2 v2.7.1 with PHP version 7.0.20
Hopefully the article saves are the only bug.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Did you try the DEV version (please backup first).
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Radosław Dzimiński
-
- Offline
- New Member
- Posts: 1
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- trogladyte
-
- Offline
- Senior Member
- Posts: 61
Please Log in or Create an account to join the conversation.
- Steven Trooster
-
- Offline
- Premium Member
- Posts: 130
- Backup your site!
- Create a test environment. The DEV version of K2 means the version can be unstable. Maybe this bug is solved, but some other issues can occur.
- Go to GitHub ( github.com/getk2/k2 ) and click on the green Clone or download button. In the popup screen choose Download ZIP. You now have an install package (k2-master.zip) which you can install on your test site
- Test K2 thoroughly. Not just this one feature, but all the essential functions you need on your site. If you come across bugs, check the issue list on GitHub . Report new issues on GitHub (note: you need an account for that)
- If you are completely sure all is working fine, install the package on your live site. (you did make a backup before installing, didn't you?)
- Test your live site thoroughly!
- If this issue is not resolved or some other nasty issue comes up, then report this and hope the K2 developer team fixes this very soon. For the time being use the workaround I posted here.
Please Log in or Create an account to join the conversation.
- trogladyte
-
- Offline
- Senior Member
- Posts: 61
However, back to topic, this major issue is now 2 months old and still not patched. My client has reported that he tried the date change workaround, but it did not work. I'll try the code edit that Reaction posted and hope this will fix it.
Please Log in or Create an account to join the conversation.
- Udi
-
- Offline
- Junior Member
- Posts: 37
We have the same issue but we have it only a week.
Please advise.
regards,
Usu
Please Log in or Create an account to join the conversation.
- Микола Корнієнко
-
- Offline
- New Member
- Posts: 2
DateTime::__construct(): Failed to parse time string (-1-11-30 02:02:04) at position 5 (-): Double timezone specification
There is an error if I add tags to the article.
Please Log in or Create an account to join the conversation.