Virtuemart 3.2.8 joomla 3.8.2 all of a sudden time is wrong on orders about 3 hours off. Checked time zone in joomla and server and they are both correct any ideas what could of caused it?
Hello If i remember correctly virtuemart does not store servertime it stores universal timezone. This is not adjusted for printout.
Regards
Jörgen @ Kreativ Fotografi
Quote from: Jörgen on December 10, 2017, 14:17:38 PM
Hello If i remember correctly virtuemart does not store servertime it stores universal timezone.
And was eloquently described in https://forum.virtuemart.net/index.php?topic=134222.0
Hi billo007,
After updating to Virtuemart 3.2.8 / Joomla 3.8.2 my order times are now also out (1 of these 2 updates responsible).
As Virtuemart does not store servertime I take it that Joomla is the culprit... Did you find a solution?
If so could you share?
Virtuemart should always store in GMT. But there is a bug in vmjsapi.php around line 878 function "date".
just add a "false" as new parameter to the JHtml functions. For example
Quote
$formatedDate = JHtml::_('date', $date, vmText::_('DATE_FORMAT_'.$format));
to
Quote
$formatedDate = JHtml::_('date', $date, vmText::_('DATE_FORMAT_'.$format),false);
Many thanks Milbo,
That sorted mine out. Muchly appreciated.
For others:
administrator/components/com_virtuemart/helpers/vmjsapi.php
Line 884 (changed 'null' to 'true') as per:
Quote$formatedDate = JHtml::_('date', $date, vmText::_('DATE_FORMAT_'.$format),null);
to:
Quote$formatedDate = JHtml::_('date', $date, vmText::_('DATE_FORMAT_'.$format),true);
Worked like a charm
Many Thanks
I am sorry, it is false (I corrected my post). True takes the timezone of the user. false takes the time of timezone of the shop. But okey, most time, it makes no difference if you use true or false
Ok, nice to know. Many thanks... Awesome work as always!