The rules are that:
1) visitors see the server date/time
2) logged-in users see their local date/time.
This is because we don't know what time-zone a user is in until they login and create a session.
This has highlighted a problem with the cache mechanism. The contents of the "on-this-day" and "upcoming-events" blocks are dependent on knowing the current day.
However, we can have two (concurrent) users in different time zones, who expect different contents of these two blocks, meaning that the cached data will be wrong for one of them.
I'm not sure how to resolve this - other than by improving the performance of the code so that we don't need caching ;-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm unassigning this one - because I've no idea how to fix it ;-)
Here's a description of the problem:
The welcome pages cache the contents of the blocks to improve performance.
When a user logs in, we can determine which time zone they are in, and hence which day they are in.
We can have two users, in two different timezones, in two different days, and the "on-this-day" block code will create the "correct" day for each of them.
Unfortunately, we only have one cache, and the caching mechanism means that one of our two users will always see the wrong data.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=1466942
Originator: NO
The welcome block is showing the server date.
The on-this-day/upcoming blocks were recently updated to show the client date.
There are various others, too.
Logged In: YES
user_id=1466942
Originator: NO
SVN1552
Logged In: YES
user_id=959928
Originator: YES
Visitors see still in the welcome block the server day/time and in the on this day block the client date.
Logged In: YES
user_id=1466942
Originator: NO
The rules are that:
1) visitors see the server date/time
2) logged-in users see their local date/time.
This is because we don't know what time-zone a user is in until they login and create a session.
This has highlighted a problem with the cache mechanism. The contents of the "on-this-day" and "upcoming-events" blocks are dependent on knowing the current day.
However, we can have two (concurrent) users in different time zones, who expect different contents of these two blocks, meaning that the cached data will be wrong for one of them.
I'm not sure how to resolve this - other than by improving the performance of the code so that we don't need caching ;-)
Logged In: YES
user_id=1466942
Originator: NO
I'm unassigning this one - because I've no idea how to fix it ;-)
Here's a description of the problem:
The welcome pages cache the contents of the blocks to improve performance.
When a user logs in, we can determine which time zone they are in, and hence which day they are in.
We can have two users, in two different timezones, in two different days, and the "on-this-day" block code will create the "correct" day for each of them.
Unfortunately, we only have one cache, and the caching mechanism means that one of our two users will always see the wrong data.
I transfer the texts of Bug #1603038 here as it is similar to this one.
I close the other posting.
On This Day block shows no events after midnight the client time but before midnight server time.
The Events of the current day are shown in the Upcomming Events block.
In the 4.0.3 code they show as expected in the On This Day block.