- Posts: 7
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- [FIXED] DateTime::__construct() [datetime.--construct]: ??
[FIXED] DateTime::__construct() [datetime.--construct]: ??
- Diogo Alberto
- Topic Author
- Offline
- New Member
Less
More
11 years 6 months ago #110942
by Diogo Alberto
[FIXED] DateTime::__construct() [datetime.--construct]: ?? was created by Diogo Alberto
Hello guys, anyone have a ideia what is that?
DateTime::__construct() [datetime.--construct]: Failed to parse time string (15/03/2013 19:42:54) at position 0 (1): Unexpected character
It happening when I click on new article on K2... just started now.. Im editing the admin page, but have no idea how this started, was working a few moments ago...
King Regards
DateTime::__construct() [datetime.--construct]: Failed to parse time string (15/03/2013 19:42:54) at position 0 (1): Unexpected character
It happening when I click on new article on K2... just started now.. Im editing the admin page, but have no idea how this started, was working a few moments ago...
King Regards
Please Log in or Create an account to join the conversation.
- Diogo Alberto
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
11 years 6 months ago #110943
by Diogo Alberto
Replied by Diogo Alberto on topic Re: DateTime::__construct() [datetime.--construct]: ??
no one knows that issue?
thanks
thanks
Please Log in or Create an account to join the conversation.
- Diogo Alberto
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
11 years 6 months ago #110944
by Diogo Alberto
Replied by Diogo Alberto on topic Re: DateTime::__construct() [datetime.--construct]: ??
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:
administrator/language/pt-BR/pt-BR.com_k2.ini
Change this original code
For this
K2_J16_DATE_FORMAT="d-m-Y H:i"
There is an error in the language translation. You have to change the date format at the file
Code:
administrator/language/pt-BR/pt-BR.com_k2.ini
Change this original code
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
K2_J16_DATE_FORMAT="d-m-Y H:i"
K2_J16_DATE_FORMAT_CALENDAR="d-m-Y H:i"
K2_J16_DATE_FORMAT_LC2="d-m-Y H:i"
K2_J16_DATE_FORMAT_LC="d-m-Y H:i"
Please Log in or Create an account to join the conversation.
- Mohammad Hasani Eghtedar
- Offline
- New Member
Less
More
- Posts: 1
11 years 3 weeks ago #110945
by Mohammad Hasani Eghtedar
Replied by Mohammad Hasani Eghtedar on topic Re: DateTime::__construct() [datetime.--construct]: ??
Fix:
in administrator\components\com_k2\views\item\view.html.php
Delete below codes:
$item->publish_up = JHTML::_('date', $item->publish_up, $dateFormat);
$item->publish_down = JHTML::_('date', $item->publish_down, $dateFormat);
replace: $created = JHTML::_('date', $item->created, $dateFormat);
with: $created = $item->created;
in administrator\components\com_k2\views\item\view.html.php
Delete below codes:
$item->publish_up = JHTML::_('date', $item->publish_up, $dateFormat);
$item->publish_down = JHTML::_('date', $item->publish_down, $dateFormat);
replace: $created = JHTML::_('date', $item->created, $dateFormat);
with: $created = $item->created;
Please Log in or Create an account to join the conversation.
- Bruno Sappadina
- Offline
- New Member
Less
More
- Posts: 1
10 years 11 months ago #110946
by Bruno Sappadina
Replied by Bruno Sappadina on topic Re: DateTime::__construct() [datetime.--construct]: ??
Thank you Mohammed, your trick did solve the problem. Great job telling us. Peace
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- [FIXED] DateTime::__construct() [datetime.--construct]: ??