Details
-
Problem report
-
Status: Confirmed
-
Trivial
-
Resolution: Unresolved
-
None
-
None
-
None
Description
It may be the same problem as ZBX-20197 but this is the problem in frontend.
When "Previous month" in graph range is selected on March 29-31, the graph shows from March 1 to 31.
It should show from February 1 to 28.
This is caused by DateTime::modify() in php.
echo (new Datetime("2022-03-29"))->modify("-1 month")->format("Y-m-d\n");
2022-03-01
I made a patch for this problem. It is based on the example in the php manual https://www.php.net/manual/en/datetime.modify.php#120513
Could you please confirm it?
Regards,
Attachments
Issue Links
- part of
-
ZBX-20197 Incorrect time calculations when using month/year argument
-
- Open
-