Time zone settings

wezetel

Active Member
As I had the problem, that the simple view of events showed different times than the details view, I tried in the elements activating the store 'date as local time'. That didn't help.
After reading the tip text of the jdate element I realized, that I need to change the webserver time zone setting to my local time (this was set as UTC). This can be done in Joomla->Global configuartion -> Server settings
Basically this seems to be a dependency between Server and Browser timezones.
Not sure what this does mean for browsers in another timezone. Probably they still will see a difference between times in simple view and details view.
 
OK, so lets talk time and what affects it and how it is displayed.

For date elements, the date-time can be stored as UTC or local.

But what governs how it is displayed to the end user?
  • We have a timezone defined in the Joomla configuration
  • We have a timezone of the hosting machine
  • We have a timezone known to the browser
So, what time do we display to the user in the FC? Do we convert UTC time to the local time of what? Joomla, host machine, browser time?

The FC system uses date-time with timezones, which should automatically adjust for DST.

I think we need to be clear as to what we want to show when before I start hacking away at the code.

Feedback please from one and all.
 
If you select a date/time e.g 14:35 - no matter if in FC, via a form calendar/timepicker icon or typing into the field - it should show this time in the form and it should show this time in list, form, details view and in FC after storing, no matter where you are and what are J! settings - as long as your location doesn't change.
The displayed format doesn't matter, it depends on your format settings where ever.

The stored time in the DB is UTC ( related to your Joomla General Config timezone setting) or 14:35 if you set the Fabrik special 'store as local' in your (j)date element.

I don't know what will happen if individual user timezones (different from the globalCinfig) are set, I assume Fabrik doesn't support this.
 
Last edited:
Usually the timezones of the hosting machine (in most cases UTC) and Joomla configuration (server location TZ) have a fixed relation. The only variant is the user timezone, which is relevant for websites with international users.
I would prefer to have all times displayed in the Joomla defined timezone (independent if it is stored in UTC or local) and ignore browser known TZ.

In those cases, where it is expected to have an international audience, the developer should add a remark: 'All times in [Joomla TZ]'.
Remark: Joomla TZ is usually based on a location/city and therefore takes daylight savings into account (e.g. today I have MESZ and in two days I have MEZ). If I had an international site, I need to state: 'All times in ME(S)Z'
 
OK, thanks. I will need to test what happens to events before and after DST changes. Otherwise I think the suggestions above are helpful.
 
I think this is fixed now. I will release a new version after you have had a chance to test my dev site per my pm.
 
OK, it looks like the issue is the browser time. The browser gets the current time from the computer it is running on. Since my test host for J! is on the same machine as the browser I am using, the timezones always match.

I was able to add an extension to my browser to timeshift it to another timezone and now I see the problem.

I can see three possible date/time scenarios that users may wish to see on the FC:
  • Always displayed in the J! timezone
  • Always displayed in UTC
  • Always displayed in the users timezone, adjusted from the J! timezone
On the third one, if the J! timezone is Berlin and the chosen time is 10:00am, the UTC is 9:00am. But if the user is browsing from Toronto, looking at this event, the displayed time would be 5:00am (Eastern). On a new event with a chosen time of 10:00am (by the user in Toronto) , the saved time would be 3:00pm (Berlin time) or as 2:00pm UTC. 10:00am will show be shown to the user in Toronto, 3:00pm to a user in Berlin. In the list on the admin it would show as 3:00pm.

Does that all make sense?

I want to make sure we are all in agreement, fix it now, and document it for users.
 
Last edited:
I think all should be in "Joomla" time.
So adding an event starting at 13:00 (no matter if time is set in the form or via dbl-click in FC at 13:00) it will show 13:00 in form/details/list and event position =13:00 in FC day/week view and 13:00 in small popup.

At least as standard/for now.

If somebody wants really to have a confusing calendar like the third one it may be possible by setting custom FC options or an additional switch in the viz or whatever. But I don't think there's a big demand.
 
Last edited:
I agree with @troester , all times should be Joomla time (and probably add a remark for international users, what TZ it is).

I don't think the third option is confusing in general, but it will become difficult if you have full day events. So for example a two day event in Berlin maybe split across three days in another TZ.
 
In a VIZ with four list I noticed that an event with more than one day was not displaying my nice blue background color but detail view show the correct information.
I made sure that all my local time settings for this list and for Joomla were correct. No change.
Then I checked the first list in the VIZ and all jdate fields there were in UTC.
Changing this to Local Time helped and everythings works fine now.
I guess the settings of the first jdate field are influencing the working of other jdate fields.
Nothing wrong with that if you are aware of it.
Just an observation...
 
@wezetel Each Jdate/Date element is treated independently as far as UTC/Local. If you see anything different (once I get you a new version) let me know.

I hope I now have all the date transitions fixed with Drag & Drop plus Resize. Can you take a look at my clone as see if I have still missed anything?
 
As I just updated and checked the calendar (Jevents) of our municipality with the dates for 2025, I think it is a rare case, where an event has an endtime between 23:00 and 00:00 (in fact I don't have any event), but in the month view these events won't have a background color in month view...
 
I have an event on my clone on Nov 22 which ends at 23:30 and it has its color background in moth view.
 

Members online

No members online now.
Back
Top