- Posts: 59
- Thank you received: 2
Custom field date not showing correcly (-1 day)
4 years 10 months ago #336637
by allbs
Custom field date not showing correcly (-1 day) was created by allbs
-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.10.0
-- PHP version -- : 7.4.16
-- Browser(s) name and version -- : Firefox
-- Error-message(debug-mod must be tuned on) -- : custom field date not showing correctly
Hi,
we have a custom date field (Advanced date picker ) that stores a value selected on a calendar
the stored value is ok but when it shows on the email loaded via preload
$content = ob_get_clean();
$vars = trim($content);
its showing 1 day before on dates selected on November.
is it because of timechange happening this weekend?
thank you
-- Joomla version -- : 3.10.0
-- PHP version -- : 7.4.16
-- Browser(s) name and version -- : Firefox
-- Error-message(debug-mod must be tuned on) -- : custom field date not showing correctly
Hi,
we have a custom date field (Advanced date picker ) that stores a value selected on a calendar
the stored value is ok but when it shows on the email loaded via preload
$content = ob_get_clean();
$vars = trim($content);
its showing 1 day before on dates selected on November.
is it because of timechange happening this weekend?
thank you
Please Log in or Create an account to join the conversation.
4 years 10 months ago #336650
by nicolas
Replied by nicolas on topic Custom field date not showing correcly (-1 day)
Hi,
By default the time of the day selected in a custom field of the time advanced date picker is midnight.
So if you have a problem with the timezone configured in your Joomla configuration or PHP, etc it's possible that it shifts to the day before.
To counter than, we have a setting in the "hikashop advanced date picker field plugin" that you can enable so that it sets the hour as noon instead of midnight for the selected days. That way, even if there is an error of 1 or 2 hours with the timezones, you'll still get the correct dates.
You can find that setting by editing the plugin via the Joomla plugins manager.
Note also that it will only help for newly saved dates. It won't help for existing ones.
By default the time of the day selected in a custom field of the time advanced date picker is midnight.
So if you have a problem with the timezone configured in your Joomla configuration or PHP, etc it's possible that it shifts to the day before.
To counter than, we have a setting in the "hikashop advanced date picker field plugin" that you can enable so that it sets the hour as noon instead of midnight for the selected days. That way, even if there is an error of 1 or 2 hours with the timezones, you'll still get the correct dates.
You can find that setting by editing the plugin via the Joomla plugins manager.
Note also that it will only help for newly saved dates. It won't help for existing ones.
Please Log in or Create an account to join the conversation.
Time to create page: 0.156 seconds