Due date show 01/01/1970

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
Joselyne
Posts: 16
Joined: 14 Dec 2023, 15:59

Due date show 01/01/1970

Post by Joselyne »

Hello,

I set a due date to a certain valid date when i creat a issue. After modifying it, the due date becomes 01/01/1970.
How can i fix it?

Thanks
cas
Posts: 1624
Joined: 11 Mar 2006, 16:08
Contact:

Re: Due date show 01/01/1970

Post by cas »

Is this within a plugin or standard Mantis?
Changes are made within which area, what is the version Mantis/OS/PHP/Mysql?
What is the date setting within Mantis, what date did you try to put in?
Joselyne
Posts: 16
Joined: 14 Dec 2023, 15:59

Re: Due date show 01/01/1970

Post by Joselyne »

This is within standard Mantis.
Mantis version : 2.26.1
PHP version : 8.0.28
Mysql version : 10.4.28-MariaDB

When i create the issue, i put 22/04/2024 as due date.
After 10 minutes, i modify/update the issue and the due date becomes 01/01/1970.
I do that update on 'bug_update_page.php' page.

What do you mean by "What is the date setting within Mantis"?
cas
Posts: 1624
Joined: 11 Mar 2006, 16:08
Contact:

Re: Due date show 01/01/1970

Post by cas »

You can configure mantis how to show the dates.
Out of the box, you can see them in config_default.php, simlpy lookup the section around dates (search for line "# MantisBT Date Settings #").
You should copy that section to core/config_inc.php and adjust as follows:

Code: Select all

$g_short_date_format = 'd-m-Y';
$g_normal_date_format = 'd-m-Y H:i';
$g_complete_date_format = 'd-m-Y H:i T';
$g_datetime_picker_format = 'DD-MM-Y HH:mm';
Of course yoyu can play around with this, see here http://www.php.net/manual/en/function.date.php
Joselyne
Posts: 16
Joined: 14 Dec 2023, 15:59

Re: Due date show 01/01/1970

Post by Joselyne »

Thank you for your proposal.
I do as you said.
But now, when i set due date to a issue, it is okey, but when clic to the modify button for the same issue, due date becomes empty.
I would like to sow what happens through images, but i can't insert the images.
I hope you understand what i mean.
cas
Posts: 1624
Joined: 11 Mar 2006, 16:08
Contact:

Re: Due date show 01/01/1970

Post by cas »

Joselyne, can you not attach some files?
Joselyne
Posts: 16
Joined: 14 Dec 2023, 15:59

Re: Due date show 01/01/1970

Post by Joselyne »

These are the files/images.
Thakns
Attachments
After the issue has been updates/modified
After the issue has been updates/modified
duedateAftreUpdate.png (2.27 KiB) Viewed 268 times
After the issue has been created
After the issue has been created
duedate.png (2.67 KiB) Viewed 268 times
due date picker while i was creating the issue
due date picker while i was creating the issue
duedate picker.png (14.2 KiB) Viewed 268 times
cas
Posts: 1624
Joined: 11 Mar 2006, 16:08
Contact:

Re: Due date show 01/01/1970

Post by cas »

What are your settings for $g_due_date_update_threshold and $g_due_date_view_threshold ?
Joselyne
Posts: 16
Joined: 14 Dec 2023, 15:59

Re: Due date show 01/01/1970

Post by Joselyne »

The settings are as follows:

$g_due_date_update_threshold = REPORTER;

$g_due_date_view_threshold = VIEWER;
cas
Posts: 1624
Joined: 11 Mar 2006, 16:08
Contact:

Re: Due date show 01/01/1970

Post by cas »

I have trouble replaying your issue.
When you do the update, whicg role are you using (Developer/admin/updater)?
Joselyne
Posts: 16
Joined: 14 Dec 2023, 15:59

Re: Due date show 01/01/1970

Post by Joselyne »

I'm admin.
But it is the same problem the for otrer users (developper, reporter, manager, etc).
cas
Posts: 1624
Joined: 11 Mar 2006, 16:08
Contact:

Re: Due date show 01/01/1970

Post by cas »

Perhaps caused by one of your plugins, I cannot reproduce with similar settings as you. So I am out of ideas :(
Post Reply