Jump to content
  • 0

Monthly Turns Into 3 Months


Alexander Orlov

Question

17 answers to this question

Recommended Posts

  • 0

I'm.still on 3.4.0

 

That's good to know. Your prorata settings would help also. My initial suspicion is that it has to do with the current day (Jan 30), and that it may be a weird date calculation issue. I've seen weird date calculation issues with PHP before, but the possibility exists that it could be a bug of our own making. My guess is that it will correct itself on its own tomorrow or the day after, but looking forward to hearing what Tyson finds out.

Link to comment
Share on other sites

  • 0

That's good to know. Your prorata settings would help also. My initial suspicion is that it has to do with the current day (Jan 30), and that it may be a weird date calculation issue. I've seen weird date calculation issues with PHP before, but the possibility exists that it could be a bug of our own making. My guess is that it will correct itself on its own tomorrow or the day after, but looking forward to hearing what Tyson finds out.

 

Here's mine Paul mate:

 

frqns7xe.png

Link to comment
Share on other sites

  • 0

This problem has to do with how php calculates "+1 month" as 30 days, and since February only has 28 days in it, it calculates one month from Jan 30 and Jan 31 into March. So only January 30-31 would be affected by this issue.

 

The fix for this will be included in the next version of Blesta as apart of CORE-1572. Being that today is January 30, you will likely want to fix this yourself in the meantime. To do so, update the file /app/models/packages.php

 

Find this line:

$today = $Date->cast($start_date, "j");

Below that line, add:

$start_date = $Date->format("Y-m-01 H:i:sP", $start_date);
Link to comment
Share on other sites

  • 0

 

This problem has to do with how php calculates "+1 month" as 30 days, and since February only has 28 days in it, it calculates one month from Jan 30 and Jan 31 into March. So only January 30-31 would be affected by this issue.

 

The fix for this will be included in the next version of Blesta as apart of CORE-1572. Being that today is January 30, you will likely want to fix this yourself in the meantime. To do so, update the file /app/models/packages.php

 

Find this line:

$today = $Date->cast($start_date, "j");

Below that line, add:

$start_date = $Date->format("Y-m-01 H:i:sP", $start_date);

 

Awesome Tyson mate, worked :D Bloody PHP haha.

Link to comment
Share on other sites

  • 0

Tyson mate, looks like this is happening again but this time it's the full costs? http://licensecart.com/billing/order/config/index/interworx/?group_id=18&pricing_id=289 on everything including: http://uploadir.com/u/qtihl5ua.png

 

Nice catch. That's actually a separate issue I described in CORE-1574. It will also be fixed for the next version.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...