Page 1 of 1

Due date show 01/01/1970

Posted: 18 Apr 2024, 08:17
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

Re: Due date show 01/01/1970

Posted: 18 Apr 2024, 08:33
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?

Re: Due date show 01/01/1970

Posted: 18 Apr 2024, 09:09
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"?

Re: Due date show 01/01/1970

Posted: 18 Apr 2024, 12:18
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

Re: Due date show 01/01/1970

Posted: 19 Apr 2024, 08:25
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.

Re: Due date show 01/01/1970

Posted: 19 Apr 2024, 09:51
by cas
Joselyne, can you not attach some files?

Re: Due date show 01/01/1970

Posted: 19 Apr 2024, 13:06
by Joselyne
These are the files/images.
Thakns

Re: Due date show 01/01/1970

Posted: 19 Apr 2024, 13:13
by cas
What are your settings for $g_due_date_update_threshold and $g_due_date_view_threshold ?

Re: Due date show 01/01/1970

Posted: 23 Apr 2024, 12:04
by Joselyne
The settings are as follows:

$g_due_date_update_threshold = REPORTER;

$g_due_date_view_threshold = VIEWER;

Re: Due date show 01/01/1970

Posted: 23 Apr 2024, 12:47
by cas
I have trouble replaying your issue.
When you do the update, whicg role are you using (Developer/admin/updater)?

Re: Due date show 01/01/1970

Posted: 23 Apr 2024, 12:57
by Joselyne
I'm admin.
But it is the same problem the for otrer users (developper, reporter, manager, etc).

Re: Due date show 01/01/1970

Posted: 23 Apr 2024, 13:12
by cas
Perhaps caused by one of your plugins, I cannot reproduce with similar settings as you. So I am out of ideas :(