VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: efocus on December 11, 2012, 11:57:18 AM

Title: BUG: Tax & Calculation Rule Publish Date Displays Wrong
Post by: efocus on December 11, 2012, 11:57:18 AM
In Products > Taxes & Calculation Rules, adding a discount is confusing because the Start Date and End Date display one day earlier than what you entered. I checked MySQL and it is storing the correct dates, but VM is displaying them wrong. Therefore, while it looks wrong, it works correctly (well, other than it's using Geneva time as per my added post below). How to duplicate this bug:

1. Create a rule for a discount. (mine is attached)
2. Choose your start and end dates. (for reference, my date format is month/day/year for the U.S.)
3. Save your rule and both dates will change to being one day earlier than you entered.
4. Check MySQL and you'll find that it stored the dates you entered, not the ones displayed in VM's rule.


[attachment cleanup by admin]
Title: BUG: Tax & Calculation Rule Publish Date Displays Wrong
Post by: efocus on December 13, 2012, 04:20:53 AM
It is also using Geneva time without adjusting for the setting in Joomla's Global Configuration > Location Settings > Server Time Zone. So I am off by 7 hours for the discounted special of the day. I had to make the change in phpMyAdmin since you can't control the time, only the date in this feature. It would be great if VirtueMart would change the Start Date and End Dates to correspond to the way Joomla handles Start Publishing and Finish Publishing in modules. That is working exactly the way it should.
Title: Re: BUG: Tax & Calculation Rule Publish Date Displays Wrong
Post by: Milbo on December 15, 2012, 00:01:33 AM
ah thank you, I will take a look on it sunday,
btw I think this here contains also the solution for the problem described by you http://forum.virtuemart.net/index.php?topic=111080.0
Title: Re: BUG: Tax & Calculation Rule Publish Date Displays Wrong
Post by: Milbo on December 16, 2012, 13:06:25 PM
But there is another problem.
When I activate a discount for the new year,... I dont want that the austrialians can use this discoutn directly, because I am still in the old year. So the timezone of your shop is the correct one. The only problem appears if you have your server in another timezone.
So even I know how to change it, I wont do it, because for me it looks wrong then. We could add a thing like. Check if the country of the main vendor is in the same timezone as server and only then use an offsett.
Title: Re: BUG: Tax & Calculation Rule Publish Date Displays Wrong
Post by: efocus on December 17, 2012, 22:10:22 PM
I probably should have started a separate bug notice for my second post. It is technically a different issue than the incorrect display of the times in 'Taxes & Calculation Rules'. This second issue is the one I am assuming you are addressing regarding the server time zone.

All I can tell you is that the way Joomla handles publishing modules by dates is working exactly as it should. I want the discounts to start and end according to my vendor's settings. In my case, the hosting server is using U.S. Mountain time with a server offset of -7:00. This same exact setting is in Joomla's configuration. So my server and Joomla are the same. The only place that time is not working properly is in VirtueMart. I am having to change the offset in phpMyAdmin just to get my discounts to trigger at the same time as the modules I'm using to display the special the discounts apply to.