News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Tax & Calculation Rules Wrong Dates

Started by leoalv, November 22, 2020, 05:14:53 AM

Previous topic - Next topic

leoalv

Hello gentlemen, thanks in advance for the answer.

  • Website Time Zone is Zurich.
  • I have created a rule to apply a 10% discount to all products and have scheduled it for a date.

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.

diri

#1
Looks like something is working with UTC (GMT).

Version of Joomla, Virtuemart, PHP?

jenkinhill

Is this with the current VirtueMart version, VM 3.8.610373 ?
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

leoalv

#3
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.

leoalv

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

diri

I bet it's caused by some Javascript.

Did you check scripts being active at the very time?

leoalv

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

diri

Because I often had some fun with Javascript and timezones. Your case meets symptoms exactly ...