Keyword

Error: Double timezone specification

  • Paul Andrews
  • Paul Andrews's Avatar Topic Author
  • Offline
  • New Member
More
7 years 11 months ago - 7 years 11 months ago #161794 by Paul Andrews
Error: Double timezone specification was created by Paul Andrews
HI, has anyone got any idea how to solve this.

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
Last edit: 7 years 11 months ago by Paul Andrews. Reason: update

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 11 months ago #161850 by Krikor Boghossian
Replied by Krikor Boghossian on topic Error: Double timezone specification
Hello,

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.

More
7 years 10 months ago - 7 years 10 months ago #162317 by Reaction
Replied by Reaction on topic Error: Double timezone specification
Having the same error.

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
Last edit: 7 years 10 months ago by Reaction.

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago - 7 years 10 months ago #162318 by Reaction
Replied by Reaction on topic Error: Double timezone specification
...didn't work. Really not sure what's up here. We do know changing the published date field manually fixes individual entries (we just can't do that for 1000+ entries)
Last edit: 7 years 10 months ago by Reaction.

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago - 7 years 10 months ago #162319 by Reaction
Replied by Reaction on topic Error: Double timezone specification
Oh man, my buddy here found a fix:

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.
Last edit: 7 years 10 months ago by Reaction. Reason: fixing syntax

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 10 months ago #162335 by Krikor Boghossian
Replied by Krikor Boghossian on topic Error: Double timezone specification
Which version of K2 are you using?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago - 7 years 10 months ago #162379 by Reaction
Replied by Reaction on topic Error: Double timezone specification
Just updated. K2 v2.7.1 on Joomla 3.7.2
Last edit: 7 years 10 months ago by Reaction.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 10 months ago #162393 by Krikor Boghossian
Replied by Krikor Boghossian on topic Error: Double timezone specification
Did you update before the error and before using Joomla! 3.7.x?

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
  • Steven Trooster's Avatar
  • Offline
  • Premium Member
More
7 years 9 months ago #162763 by Steven Trooster
Replied by Steven Trooster on topic Error: Double timezone specification
Any definite solution yet?

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
  • Steven Trooster's Avatar
  • Offline
  • Premium Member
More
7 years 9 months ago #162764 by Steven Trooster
Replied by Steven Trooster on topic Error: Double timezone specification
There is a work around for now: when editing an item, go to the Publishing & Meta tab and correct the created date. (Set it to today or whatever date, as long as the date format is yyyy-mm-dd hh:mm:ss)

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 9 months ago #162777 by Krikor Boghossian
Replied by Krikor Boghossian on topic Error: Double timezone specification
A solution would be to backup and using the DEV version,
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.

More
7 years 9 months ago #162791 by The Rock Father
Replied by The Rock Father on topic Error: Double timezone specification
Just chiming in to say that I have the same error - just updated to Joomla 3.73 yesterday. Articles for my site are only added on the back end, and on occasion the saves throw this:
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
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 9 months ago #162811 by Krikor Boghossian
Replied by Krikor Boghossian on topic Error: Double timezone specification
Hello,

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
  • Radosław Dzimiński's Avatar
  • Offline
  • New Member
More
7 years 9 months ago #162835 by Radosław Dzimiński
Replied by Radosław Dzimiński on topic Error: Double timezone specification
I don`t understand - what dev version? Where is it?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 9 months ago #162838 by Krikor Boghossian
Replied by Krikor Boghossian on topic Error: Double timezone specification
Try the link in the post :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
7 years 9 months ago #162851 by trogladyte
Replied by trogladyte on topic Error: Double timezone specification
I have the same problem. Went to GitHub. No idea how to download or use anything on that page. Will a stable release fixing this bug?

Please Log in or Create an account to join the conversation.

  • Steven Trooster
  • Steven Trooster's Avatar
  • Offline
  • Premium Member
More
7 years 9 months ago - 7 years 9 months ago #162860 by Steven Trooster
Replied by Steven Trooster on topic Error: Double timezone specification
For those unfamiliar with GitHub here a small guide:
  1. Backup your site!
  2. 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.
  3. 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
  4. 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)
  5. 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?)
  6. Test your live site thoroughly!
  7. 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.
Last edit: 7 years 9 months ago by Steven Trooster.

Please Log in or Create an account to join the conversation.

More
7 years 9 months ago #162869 by trogladyte
Replied by trogladyte on topic Error: Double timezone specification
Thanks for the guide Steven. I've known what GitHub was for years, but never knew quite how to use it, so this is a great hand up.

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.

More
7 years 9 months ago #162905 by Udi
Replied by Udi on topic Error: Double timezone specification
Hi,
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.

  • Микола Корнієнко
  • Микола Корнієнко's Avatar
  • Offline
  • New Member
More
7 years 9 months ago #162907 by Микола Корнієнко
Replied by Микола Корнієнко on topic Error: Double timezone specification
DateTime::__construct(): Failed to parse time string (-1-11-30 02:02:04) at position 5 (-): Double timezone specification
The same problem.
There is an error if I add tags to the article.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum