×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: timezone for locations

timezone for locations 9 years 1 month ago #30537

  • Scott King
  • Scott King's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 2
I'm revisiting something we talked some about before...

I currently serve events for locations in 3 different time zones from Matukio located on a single server. Everyone has their Joomla timezone set to the timezone the server is in. I would like to be able to define a timezone for locations configured in Matukio so that the times are displayed on the front-end in that timezone. That way, everyone sees the event in the timezone in which it's held as well. You could include the user's local timezone as well in the event details and listing if desired.

It would also be nice if the times entered by the organizer are treated as the timezone specified for the location but that's not as important as the first part of this suggestion.

For now, I modified the modern template to display all three timezones on the event details page. It turned out to be pretty simple with code like the following:
$startdate = new DateTime($this->event->begin, new DateTimeZone('UTC'));
$startdate->setTimezone(new DateTimeZone('America/Denver'));
echo ", ".$startdate->format('H:i (T)') . "\n";
$startdate->setTimezone(new DateTimeZone('America/New_York'));
echo ", ".$startdate->format('H:i (T)') . "\n";
  • Page:
  • 1
Time to create page: 0.149 seconds