Skip to content

Fix how pdoAggregator logs the day that was aggregated.#1932

Merged
aaronweeden merged 2 commits intoubccr:xdmod11.0from
aaronweeden:fix-period-display
Feb 7, 2025
Merged

Fix how pdoAggregator logs the day that was aggregated.#1932
aaronweeden merged 2 commits intoubccr:xdmod11.0from
aaronweeden:fix-period-display

Conversation

@aaronweeden
Copy link
Copy Markdown
Contributor

@aaronweeden aaronweeden commented Oct 25, 2024

Description

Currently, if pdoAggregator is used to aggregate a single day, the day it displays in the log is off by one. I noticed this when manually aggregating a day (2016-11-01) of Gateways data:

sudo -u xdmod /data/www/xdmod/share/tools/etl/etl_overseer.php -v debug -a xsede.science-gateway.AggregationByDay -s '2016-11-01 00:00:00' -e '2016-11-01 23:59:59' -f
...
[info] Aggregated day (1/1) 201600306 02 11 2016

That should instead be 01 11 2016.

This is because the Y00z format string counts days of the year starting at zero, but MySQL DAYOFYEAR counts starting at one.

This PR fixes how the day is displayed. It also changes the format to match what is used often elsewhere, Y-m-d.

Tests performed

Tested by aggregating a day of Gateways records on xdmod-dev and confirming the displayed day is correct.

Checklist:

  • The pull request description is suitable for a Changelog entry
  • The milestone is set correctly on the pull request
  • The appropriate labels have been added to the pull request

@aaronweeden aaronweeden added bug Bugfixes php Pull requests that update Php code labels Oct 25, 2024
@aaronweeden aaronweeden added this to the 11.0.1 milestone Oct 25, 2024
@jpwhite4
Copy link
Copy Markdown
Member

is this supposed to go into 11.0.1 or 11.5.0?

@aaronweeden aaronweeden changed the base branch from main to xdmod11.0 February 6, 2025 19:34
@aaronweeden aaronweeden merged commit effb79a into ubccr:xdmod11.0 Feb 7, 2025
2 checks passed
@aaronweeden aaronweeden deleted the fix-period-display branch February 7, 2025 15:49
aaronweeden added a commit to aaronweeden/xdmod that referenced this pull request Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bugfixes php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants