Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • environc Friend
    #183554

    Hello,

    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 character

    How do I set my date format to that I have dd mmm yyyy without the 500 errror?

    Thanks in advance

    HeR0 Friend
    #478053

    Hi 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 Friend
    #478127

    Hi 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 Friend
    #478187

    Hi 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 version

    Regards

    environc Friend
    #478221

    Hi 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 Friend
    #478258

    Hi,

    If you restore all to default, I’m sure that you can post job without this problem.

    Regards

    brentwilliams2 Friend
    #491178

    For 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.

Viewing 7 posts - 1 through 7 (of 7 total)

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