Forum


Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Timezone

Timezone 5 Monate 1 Tag ago #7484

  • SKirk
  • SKirks Avatar
  • Online
  • User-Bewertung: 0
Hi,

We have set up demos of OSG Court Reservations and we see that every day at 8 pm Toronto time (20:00), the date changes and we lose the rest of the evening's bookings. It looks like OSG Court Reservations is running on UTC, despite the fact that our Joomla site is set to the Toronto timezone (see attachment). I have tried adding a Timezone field in config.xml:
<field name="mytimezone" type="timezones" default="-4" label="Select a timezone" description="" />
That doesn't help. We set the booking limit to -4, which works around the problem during the day, but when 8 pm arrives the day disappears. This is a big problem for tennis clubs that book lighted courts until 11 pm.
Can this situation be easily corrected?

Thanks very much,
Steve
Anhang:
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Timezone 4 Monate 4 Wochen ago #7515

  • liu
  • OSG Developer
  • lius Avatar
  • Offline
  • User-Bewertung: 50
Hello Steve,

I spent the time to investigate this issue. I don't think that the software was designed by the former developer in a way of working with the Joomla timezone setting. The courts software, as far as I see, relies on the local server timezone, that means, not exactly UTC, either.

That means, if you install the courts software on a local server which timezone is located in Atlantic/Canary, but the website is made supposedly for Argentina (you set the Joomla global timezone to Argentina), the software won't work correctly.

Could you please confirm which timezone is set on your local server right now? Simply put the following line in the index.php of your Joomla site and take a quick look:
echo date_default_timezone_get();
exit;
PS: don't put this line anywhere else, for example in courts controller. It will get reset by calling JFactory...

If I get this info, I can consider a quick solution for you, but you might need to change one line in the Joomla core.
Your feedback on the extensions.joomla.org/extension/osg-seminar-manager-pro/ supports our work and the further development of our products.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Timezone 4 Monate 4 Wochen ago #7516

  • SKirk
  • SKirks Avatar
  • Online
  • User-Bewertung: 0
Hi Liu,

Thanks for your response! The default shown is UTC.

Steve
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Timezone 4 Monate 4 Wochen ago #7520

  • SKirk
  • SKirks Avatar
  • Online
  • User-Bewertung: 0
Hi Liu,

Sorry but I couldn't wait - I have implemented a temporary fix, by adding the following to the php.ini :

date.timezone = America/Toronto

But this is really not an ideal solution - your application should be Joomla compliant throughout. Hopefully this will appear in a future update?
(I am still a little concerned about 5 explicit 'UTC' references in .../helpers/osgcourts.php - no time to check them out in depth.)
Best Regards,
Steve
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Timezone 4 Monate 4 Wochen ago #7521

  • liu
  • OSG Developer
  • lius Avatar
  • Offline
  • User-Bewertung: 50
Hello Steve,

thanks for your feedbacks. For now I think the update of timezone in php.ini ist the best option for you. My recommendation was to add one line in Joomla date_default_timezone_set(...) in case of you can't change the setting on server side, you can't do it in courtscomponent, bc it gets reset by calling jfactory getdate.

For the 5 references 'UTC' in courts: I just checked that and didn't see the function is used anywhere in the software. Such function should be used if the timing of all your events are stored in UTC in database. Apparently it is not that case in courts.

And yes I have the idea and plan to modify the software to make it functionable with the Joomla globle timezone setting and I will talk about it in the team. I will leave the storage as it was designed by the former developer. But on frontend by the calculation of appearance it should rely on the joomla global timezone instead of the local server timezone. Otherwise as we have already duscussed, the component won't work if you live in Colombia and rent a webhosting in India to make a website for Colombia, in case of you can't change the server side setting.
Your feedback on the extensions.joomla.org/extension/osg-seminar-manager-pro/ supports our work and the further development of our products.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Timezone 4 Monate 4 Wochen ago #7523

  • SKirk
  • SKirks Avatar
  • Online
  • User-Bewertung: 0
Hi Liu,
Thanks very much for your reply. Best of luck with your update. The important property of time in this application is consistency - the time must be consistent through all the processes and modules. Once this is achieved, it will be ready for any locale!
Best Regards,
Steve
Der Administrator hat öffentliche Schreibrechte deaktiviert.
© 2017 Open Source Groupe GmbH. Alle Rechte vorbehalten.
Cookies erleichtern die Bereitstellung unserer Dienste. Mit der Nutzung unserer Dienste erklären Sie sich damit einverstanden, dass wir Cookies verwenden.