Hi there
I am using vm 3.2.2 with joomla 3.7.4 on a website with standard linux installation and php 5.5.9-1ubuntu4.22
now the strange problem i am facing is that whenever we enter a date in the date calendar (vm custom field). the joomla is saving it one day behind.
any body else experience something like this before ?
Regards
Jawad
Fixed here http://dev.virtuemart.net/attachments/download/1086/com_virtuemart.3.2.3.9614_extract_first.zip
Hi Milbo
thanks for the quick reply but I am still facing the same problem with shopper fields on both FE and BE after installing the updated version.
Do I have to set some config options as well ?
Regards
Jawad
I was able to fix the problem on my own.
It seems that the function broke when we use some other format instead of default one.
I was able to solve this problem by adding this code in vmjsapi.php file in administrator/component/com_virtuemart/helpers directory.
The code below starts at line # 816 for me
if ($date) {
$formatedDate = JHtml::_('date', $date, $dateFormat );
// date patch for the one day behind issue.
$date1 = new DateTime($date);
$formatedDate = $date1->format("$dateFormat");
}
else {
$formatedDate = vmText::_('COM_VIRTUEMART_NEVER');
}
Quote from: jawadakr on August 28, 2017, 20:58:08 PM
The code below starts at line # 816 for me
if ($date) {
$formatedDate = JHtml::_('date', $date, $dateFormat );
// date patch for the one day behind issue.
$date1 = new DateTime($date);
$formatedDate = $date1->format("$dateFormat");
For what do you need $formatedDate = JHtml::_('date', $date, $dateFormat ); ? I think you can remove this line[/code]
Oh that is the default code :) I just commented it.