Skip to content

Conversation

hyunnaye
Copy link
Contributor

Description
We noticed the events in the new github s3 bucket is creating folders with a wrong current date.

This was because the getMonth function is zero-index based so we have to add 1 to get the correct month.

Issue
https://ucsc-cgl.atlassian.net/browse/SEAB-5604

Security
If there are any concerns that require extra attention from the security team, highlight them here.

Please make sure that you've checked the following before submitting your pull request. Thanks!

  • Ensure that the PR targets the correct branch. Check the milestone or fix version of the ticket.

@hyunnaye hyunnaye self-assigned this Apr 19, 2024
@hyunnaye hyunnaye requested review from denis-yuen and kathy-t April 19, 2024 17:44
const bucketPath = `${uploadDate.getFullYear()}-${uploadDate.getMonth()}-${uploadDate.getDay()}/${deliveryId}`; //formats path to YYYY-MM-DD/deliveryid
const bucketPath = `${uploadDate.getFullYear()}
-${uploadDate.getMonth() + 1}
-${uploadDate.getDate()}/${deliveryId}`; //formats path to YYYY-MM-DD/deliveryid
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth double-checking that the date is 0 or 1 indexed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hyunnaye hyunnaye merged commit 1666f6e into develop Apr 19, 2024
@denis-yuen denis-yuen deleted the feature/seab-5604-date-fix branch April 19, 2024 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants