You need to be logged in to view a user's profile.
  Tuesday, 08 March 2022
  2 Replies
  603 Visits
0
Votes
Undo
I am currently in the process of putting together a website aimed at an international community of players of a game i like.
On this website, i am hosting a calendar showing the events of that game.
This calendar is backed by .ics files referring to the utc at which these events occur.
My goal is to display these events in my calendar not at utc or a set timezone, but instead make the events display in the correct timezone for whoever loads my page.
I already did some coding, and can now retrieve an accurate user timezone in php by

Factory::getApplication()->getSession()->get('time')
in php. This is already a DateTimeZone object. Obviously it needs to be guarded in case my code to initialize the session cookies have not been loaded yet, but that doesn't matter for now.

Now. I have my events in UTC, and i have the timezone in which i would want them displayed (dynamically, per-user). Does anyone have a good tip on where i would have to modify the jevents code to modify the events time according to client timezone after they are being read from the databank? I have tried a couple different things, with different outputs so far:
1) nothing happend
2) the timezone would only be adjusted when calling the ics refresh link; if a friend in EST called the ics refresh it would also display as EST for me in CET
3) Events would shift by a certain time but not jump to a new date (e.g. start at 13pm....)
I did not yet manage to create ideal scenario of a client specific shift.
I am very aware this might be outside of what jevents is supposed to do, but if there is any chance to get this working i am willing to attempt it.
2 years ago
·
#225252
0
Votes
Undo
Why not show the timezone and the time for each timezone? You can use the JEvents Custom Layout editor for it to display the timezone and time in that zone?

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

2 years ago
·
#225256
0
Votes
Undo
You are correct, i could display the time delta from UTC. And I probably will either do that, look for a different calendar tool or write something custom. But I don't like that solution because it assumes my users to be smart. Its less accessible than I'd like, which is why i am willing to invest the extra time to make it dynamic. There is currently tools out there that provide similar service in an installed app. However i got together with that Dev and we agreed a web page would be better. Which also includes feature parity so users get an easy switch.
  • Page :
  • 1
There are no replies made for this post yet.

Members Area

Show your support

Unlike many Joomla calendars we do not charge to download JEvents - please show your support for this project by becoming a member of the JEvents Club Club members get access to early releases, exclusive member support forums, and Silver and Gold members can use many exciting JEvents addons

Your membership will ensure that JEvents continues to be the best events calendar for Joomla.