Show Date Time in user timezone

startpoint

Active Member
I use element date_time.
Element data is being stored in UTC.
Joomla Global timezone is UTC.
How to show date time with selected timezone on logged user?
I can't find way how to layout override date element.
I can do through custom php list event, but i search for easier way through element.
Then this will be apply for all lists and forms.
Any suggestions?
 
Not possible with layout override as I know of. Your best bet is probably to modify and install e.g. jdate element with different name or just add the modifications again every time after updating Fabrik.

Did a quick check and in jdate.php there are the following lines: $timeZone = new DateTimeZone($this->config->get('offset'));

You probably need to change these to get the user timezone instead of Joomla global one. Some more info about getting user timezone is here:
https://docs.joomla.org/How_to_use_JDate/en
 
Is it for display (list, details) only or also for input?
For display it may be possible to "override" the behaviour with custom templates (if element=date_time do some date/string handling...).
 
Thank you for your suggestions.
I think the easest way is to clone the plugin, modify it and use it instead of date or jdate element.
After fabrik update then need to check for some element changes.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top