View Issue Details

IDProjectCategoryView StatusLast Update
0034829mantisbtplug-inspublic2026-08-21 19:27
Reporteramphetamine Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
OSwindowsOS Version10 
Target Version2.29.0Fixed in Version2.29.0 
Summary0034829: Graph plugin: deprecated strftime() in View Issues > issue trends
Description

view issues > issue trends > drop list select the date

DEPRECATED: 'Function strftime() is deprecated' in '...\xampp\htdocs\mantis\plugins\MantisGraph\core\Period.php' line 192
DEPRECATED: 'Function strftime() is deprecated' in '...\xampp\htdocs\mantis\plugins\MantisGraph\core\Period.php' line 193
DEPRECATED: 'Function strftime() is deprecated' in '...\xampp\htdocs\mantis\plugins\MantisGraph\core\Period.php' line 249
DEPRECATED: 'Function strftime() is deprecated' in '...\xampp\htdocs\mantis\plugins\MantisGraph\core\Period.php' line 258

when selec arbitrary date, the field cannot be keyed in

TagsPHP 8.1
Attached Files
issue trending dates.png (3,034 bytes)   
issue trending dates.png (3,034 bytes)   

Relationships

related to 0025681 resolveddregad Problem with date range filter in MantisGraph issues_trend_page.php 
has duplicate 0037136 closeddregad Replace deprecated strftime() with date() in MantisGraph Period class 

Activities

dregad

dregad

2024-10-09 06:01

developer   ~0069319

when selec arbitrary date, the field cannot be keyed in

@amphetamine, this bug has been reported in the past, see 0025681 - you even posted in that thread... See 0025681:0061837 for root cause analysis.

With regards to the strftime() deprecation warnings, thanks reporting the issue; I'll use this issue to track that, and change the summary accordingly.

dregad

dregad

2025-02-25 20:29

developer   ~0069922

Issue resolved by mistake due to pushing a work-in-progress branch to the mantisbt repository instead of my own fork. Sorry about the noise.

dregad

dregad

2026-07-18 12:36

developer   ~0071308

PR https://github.com/mantisbt/mantisbt/pull/2247

Related Changesets

MantisBT: master 92d4e16c

2024-10-11 13:10

dregad


Details Diff
Refactor the Period class to use DateTime objects

The code now relies on DateTimeImmutable::modify() instead of custom
logic based on strftime(), mktime() and getdate() to calculate the
various period types' start and end timestamps.

This fixes the deprecation warnings caused by calls to strftime() on
PHP 8.1 or later.

The methods returning formatted dates now use $g_normal_date_format
config, instead of hardcoded, custom date formats. This fixes display
of the selected date in the input fields when reloading the page after
submitting the form.

Code cleanup: fix static analysis warnings, improve PHPDoc.

Fixes 0034829
Affected Issues
0034829
mod - plugins/MantisGraph/core/Period.php Diff File

MantisBT: master 191d9c83

2024-10-22 08:11

dregad


Details Diff
Period end cannot be in the future

Fixes 0034829
Affected Issues
0034829
mod - plugins/MantisGraph/core/Period.php Diff File

MantisBT: master 6b73820b

2024-10-22 08:22

dregad


Details Diff
Use constants for Period names

Fixes 0034829
Affected Issues
0034829
mod - plugins/MantisGraph/core/Period.php Diff File

MantisBT: master e6c6697e

2024-10-22 08:25

dregad


Details Diff
Don't display Period dates when type is None

Fixes 0034829
Affected Issues
0034829
mod - plugins/MantisGraph/core/Period.php Diff File