VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: leoalv on November 22, 2020, 05:14:53 AM

Title: Tax & Calculation Rules Wrong Dates
Post by: leoalv on November 22, 2020, 05:14:53 AM
Hello gentlemen, thanks in advance for the answer.

The problem is that this discount is not published until 1 hour after the selected date (I calculated it by changing the date in the database). The same thing happens with the end date.

My question is where can I increase the script that publishes the discount by 1 hour? or the scheduled rules?

The time tested with PHP is correct, the order date is correct, all other dates are fine. I have also tried it with other sites that have a Berlin Time Zone and another with Universal Time, Coordinated (UTC) time zone in the 4 sites. There is this problem, I don't know if it is a virtuemart bug.

Thanks, I hope to fix this asap.
Title: Re: Tax & Calculation Rules Wrong Dates
Post by: diri on November 22, 2020, 09:15:47 AM
Looks like something is working with UTC (GMT).

Version of Joomla, Virtuemart, PHP?
Title: Re: Tax & Calculation Rules Wrong Dates
Post by: jenkinhill on November 22, 2020, 12:59:59 PM
Is this with the current VirtueMart version, VM 3.8.610373 ?
Title: Re: Tax & Calculation Rules Wrong Dates
Post by: leoalv on November 22, 2020, 16:29:31 PM
The sites have the following versions of Joomla and Virtuemart
Joomla 3.9.19 + VM 3.8.2 10325
Joomla 3.9.22 + VM 3.8.4 10335
Joomla 3.9.22 + VM 3.8.6 10373
PHP versions 7.4.11 and 7.4.12 date() show correct time and date.

in all it has the same problem.
Title: Re: Tax & Calculation Rules Wrong Dates
Post by: leoalv on November 27, 2020, 16:48:27 PM
Gentlemen developers, any news about this? apparently it is a bug, because I have also done tests on localhost and it has the same problem.

Regards
Title: Re: Tax & Calculation Rules Wrong Dates
Post by: diri on November 28, 2020, 09:23:24 AM
I bet it's caused by some Javascript.

Did you check scripts being active at the very time?
Title: Re: Tax & Calculation Rules Wrong Dates
Post by: leoalv on November 28, 2020, 15:43:32 PM
Quote from: diri on November 28, 2020, 09:23:24 AM
I bet it's caused by some Javascript.

Did you check scripts being active at the very time?

It can't be from Javascript, because the publication date is handled on the server side and not on the client side, or am I wrong? Why do you suppose it is javascript?

Regards
Title: Re: Tax & Calculation Rules Wrong Dates
Post by: diri on November 30, 2020, 09:48:10 AM
Because I often had some fun with Javascript and timezones. Your case meets symptoms exactly ...