-
AuthorPosts
-
environc Friend
environc
- Join date:
- December 2012
- Posts:
- 173
- Downloads:
- 0
- Uploads:
- 33
- Thanks:
- 30
- Thanked:
- 2 times in 1 posts
January 1, 2013 at 5:27 pm #183554Hello,
I changed my display date format in JA Job Board: System Configuration to %d %M %Y. When employer is posting job and selects a publish date with the date picker, the date comes as “10 33” for 24 Jan 2013 in the textfield next to date picker. The date format I intend to have all over my site is 24 Jan 2013 (not Jan 24 2013, 2013 Jan 24 etc). When employer submits the Edit/add job form, the following error shows:
500
DateTime::__construct() : Failed to parse time string (01 00) at position 0 (0): Unexpected characterHow do I set my date format to that I have dd mmm yyyy without the 500 errror?
Thanks in advance
HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
January 2, 2013 at 7:07 am #478053Hi Environc,
Please open file administrator/components/com_jajobboard/asset/renderfield.php and go to function rendfield , find line case “DATE_CAL” , change 2 line code as below:
$dateFormat = $dateFormat[0] . " " . str_replace(array("i", "s"), array("M", "S"), $dateFormat[1]);
to
$dateFormat = strtolower($dateFormat[0]) . " " . str_replace(array("i", "s"), array("M", "S"), $dateFormat[1]);
$dateFormat = $dateFormat[0];
to
$dateFormat = strtolower($dateFormat[0]);
Hope this helps.Regards and Happy new year.
environc Friendenvironc
- Join date:
- December 2012
- Posts:
- 173
- Downloads:
- 0
- Uploads:
- 33
- Thanks:
- 30
- Thanked:
- 2 times in 1 posts
January 2, 2013 at 3:08 pm #478127Hi Hero,
I tried the above code but it’s not going, I got the error
500
DateTime::__construct() : Failed to parse time string (01 00) at position 0 (0): Unexpected character
To undo all changes, I restored the file administrator/components/com_jajobboard/asset/rendfield.php to the original from the download + I restored the date format in JA Job Board: System Configuration to %Y-%m-%d %H:%i:%s but now I get the error when I want to save new job post .Publish date must be date time format (ex:2009-04-22 16:20:36)
Everything regarding date and time should be restored to default but I don’t know why I get the publish date error.
Thanks a lot in advance.
HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
January 3, 2013 at 2:31 am #478187Hi Environc,
Where -frontend or backend- did you edit or add new job ? If you do that on frontend, you must edit in file components/com_jajobboard/asset/rendfield.php
PS: please upgrade to latest version 1.0.3 if you are using an old versionRegards
environc Friendenvironc
- Join date:
- December 2012
- Posts:
- 173
- Downloads:
- 0
- Uploads:
- 33
- Thanks:
- 30
- Thanked:
- 2 times in 1 posts
January 3, 2013 at 7:00 am #478221Hi Hero. Thanks for the note. Editing jobs no problems because the date picker doesn’t come up. I’m facing these problems when adding jobs for the first time. I’m still getting error Publish date must be date time format (ex:2009-04-22 16:20:36) when I submit the form. I changed the file components/com_jajobboard/asset/rendfield.php
from
$dateFormat = $dateFormat[0] . ” ” . str_replace(array(“i”, “s”), array(“M”, “S”), $dateFormat[1]);
to$dateFormat = strtolower($dateFormat[0]) . ” ” . str_replace(array(“i”, “s”), array(“M”, “S”), $dateFormat[1]);
and from$dateFormat = $dateFormat[0];
to$dateFormat = strtolower($dateFormat[0]);
But I still get the same error when I add a new job even though I tried with date formats in administration as %Y-%m-%d %H:%i:%s and as %d-%m-%Y %H:%i:%s.
My version is the latest version (1.0.3) as I downloaded it about 2 weeks ago. I just installed JA Job board, so I’m still configuring it.
Cheers
HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
January 3, 2013 at 10:44 am #478258Hi,
If you restore all to default, I’m sure that you can post job without this problem.
Regards
brentwilliams2 Friendbrentwilliams2
- Join date:
- January 2013
- Posts:
- 231
- Downloads:
- 0
- Uploads:
- 23
- Thanks:
- 4
- Thanked:
- 33 times in 1 posts
April 26, 2013 at 9:42 pm #491178For anyone having the error, “Publish date must be date time format”, then change back your Display date format to the default:
%Y-%m-%d %H:%i:%s
It is located in the System Config under the “General” tab.
1 user says Thank You to brentwilliams2 for this useful post
-
AuthorPosts
This topic contains 7 replies, has 3 voices, and was last updated by brentwilliams2 11 years, 7 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum