Body: <p>Server clock is fine, it runs cron, but when the job runs on months ending in 30 days , the membership status  refuses to update, it need an extra day, as if every ,month were 31 days</p>
  <p>For all 31 day months, the system and - cron job - works fine and the membership status updates correctly.</p>
  <p>Example : June 30 status change will update correctly on July 2. February 28 statue remains unchanged until March 3rd.</p>
  <p>The path for the cron job in question is here :
  civicrm/admin/job?action=update&amp;id=11&amp;reset=1</p>
  <p>we set the job to run hourly which from the logs, it appears to be doing.</p>
  <p>Members are required to renew their status by the end of the month or their status changes and they face a late fee. All the end date adjustments are correct, it appears to be something somewhere defining the unit month as 31 days.</p>
  <p>We've tried grepping the prod codebase for the keyword “processMembership”: &quot;30 days&quot; &quot;31 days&quot; and it came up with no answer.</p>
  <p>Any guidance or assistance appreciated!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-09-29T01:14:32.953Z
Comments.Text: Are the displayed expiration dates for the memberships correct? Can you go to a membership that should be expired and see that the expiration date is listed as a date in the past, but the status has not been updated?
Comments.UserDisplayName: Lars SG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-09-30T21:18:57.740Z
Comments.Text: That is correct. So as of right now, at 512 PM US EDT, Members whose status shows right now as "3 Months Overdue" will not change to "4 Months Overdue" at midnight tonight, i.e. first tick of the system clock to midnight 10/01/2023. So, for the 24 hour period beginning midnight tonight, we expect the status will remain stuck on "3 Months Overdue" until the following evening, i.e. midnight tomorrow night,  10/02/2023.
Comments.UserDisplayName: Hardwick
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-09-30T21:20:29.930Z
Comments.Text: Only thing we can think of is to manually adjust the membership status @ midnight tonight.
Comments.UserDisplayName: Hardwick
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-01T00:11:15.130Z
Comments.Text: OK, but if you go and look at a membership that should expire today, does it have a Membership Expiration Date of Sept 30 or Oct 1?
Comments.UserDisplayName: Lars SG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-06T23:58:17.340Z
Comments.Text: does it have a Membership Expiration Date of Sept 30 or Oct 1?hanks for getting back, "does it have a Membership Expiration Date of Sept 30 or Oct 1?
Comments.UserDisplayName: Hardwick
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-07T00:33:47.703Z
Comments.Text: Continuing above : Yes, they are all set to expire at end of month, i.e. Sept 30. Something interesting : they worked this time on 10/1 for most statuses, except  expired 08/31/2023 took an extra day to update status, Please note :Cron is set to hourly , runs fine seemingly and the end event adjustment is same for all statuses,  e.g add one moth as unit for each month past due. (We don't go by days anywhere in the membership status configurations)
Comments.UserDisplayName: Hardwick
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-10T18:31:27.320Z
Comments.Text: Can you post your membership status rules configuration in a screenshot maybe?
Comments.UserDisplayName: Lars SG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-18T01:09:27.387Z
Comments.Text: Yes, we will do that asap!
Comments.UserDisplayName: Hardwick
Tags: <civimember><cron><status>
Title: Membership Status Processor Fail on Months Less than 31 Days
ThreadText: # Membership Status Processor Fail on Months Less than 31 Days
  
  (Asked by: username_0 on 2023-09-29)
  
  Server clock is fine, it runs cron, but when the job runs on months ending in 30 days , the membership status refuses to update, it need an extra day, as if every ,month were 31 days
  
  For all 31 day months, the system and - cron job - works fine and the membership status updates correctly.
  
  Example : June 30 status change will update correctly on July 2. February 28 statue remains unchanged until March 3rd.
  
  The path for the cron job in question is here :
  civicrm/admin/job?action=update&id=11&reset=1
  
  we set the job to run hourly which from the logs, it appears to be doing.
  
  Members are required to renew their status by the end of the month or their status changes and they face a late fee. All the end date adjustments are correct, it appears to be something somewhere defining the unit month as 31 days.
  
  We've tried grepping the prod codebase for the keyword “processMembership”: "30 days" "31 days" and it came up with no answer.
  
  Any guidance or assistance appreciated!
  
  **Tags:** civimember, cron, status
  
  > **Comments:**
  > **username_1**: Are the displayed expiration dates for the memberships correct? Can you go to a membership that should be expired and see that the expiration date is listed as a date in the past, but the status has not been updated?  
  > **username_0**: That is correct. So as of right now, at 512 PM US EDT, Members whose status shows right now as "3 Months Overdue" will not change to "4 Months Overdue" at midnight tonight, i.e. first tick of the system clock to midnight 10/01/2023. So, for the 24 hour period beginning midnight tonight, we expect the status will remain stuck on "3 Months Overdue" until the following evening, i.e. midnight tomorrow night,  10/02/2023.  
  > **username_0**: Only thing we can think of is to manually adjust the membership status @ midnight tonight.  
  > **username_1**: OK, but if you go and look at a membership that should expire today, does it have a Membership Expiration Date of Sept 30 or Oct 1?  
  > **username_0**: does it have a Membership Expiration Date of Sept 30 or Oct 1?hanks for getting back, "does it have a Membership Expiration Date of Sept 30 or Oct 1?  
  > **username_0**: Continuing above : Yes, they are all set to expire at end of month, i.e. Sept 30. Something interesting : they worked this time on 10/1 for most statuses, except  expired 08/31/2023 took an extra day to update status, Please note :Cron is set to hourly , runs fine seemingly and the end event adjustment is same for all statuses,  e.g add one moth as unit for each month past due. (We don't go by days anywhere in the membership status configurations)  
  > **username_1**: Can you post your membership status rules configuration in a screenshot maybe?  
  > **username_0**: Yes, we will do that asap!  
  
  ---
  
  ## 0 answers
  
  