Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aaronweeden
Copy link
Contributor

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.

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
Member

is this supposed to go into 11.0.1 or 11.5.0?

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