Backend time does not match Joomla Server time zone

Hi Everyone, I'm using the DJ-League extension, but ever since I change the Joomla server time to my time zone (los Angeles), the game times are off by 8 hours in the schedule and in the back-end League Game Management component. When I edit a game date and time in the DJ-League component to for example 6 p.m, I enter 18:00, but when I save it, the time changes to 10 a.m or 10:00. How can I fix this?
I tried to follow the instructions that askibar and szym gave in this post : https://community.djxtensions.com/discussion/comment/1402/#Comment_1402 and that did not change the time.
Thanks

Best Answer

  • Answer ✓
    Yes, we know that the time on the list in the back-end is not displayed in joomla timezone, but it doesn't harm anything and the time is correctly stored in the database. The game time is also correctly displayed in the game edit form and in the front-end. We will fix displaying time in the back-end games list in the next release. The proper way to do it is to replace the 151 line with
    <?php echo JHtml::date($item->date, 'Y-m-d H:i')?>

    Regarding score tables columns order I have a good news for you. You can adjust the columns ordering and even hide some of the columns in the component configuration.
    https://cdn.dj-extensions.com/images/dj-league-columns-ordering.gif

    Best
    Szymon

Answers

  • Hello,
    what version of DJ-League do you use? Have you set the timezone in your Joomla configuration or only in your server settings?
  • Hi Szym, I'm using 1.0 Beta 1. I'm using a hosted server, so I've only changed the timezone in the Joomla Global configurations settings. I've also added a line to my index.php file like this date_default_timezone_set('America/Los_Angeles'); but that did not fix the issue. I can go into phpMyAdmin back-end and type sql code, Show variables like '%time_zone'; Select now(); and the time the database displays is the correct one I see on my computer.
  • Please update DJ-League to the latest beta6 version and remove the changes you have made in the index.php file.

    Let me know if it solves the timezone issue.
  • I upgraded to 1.0 Beta 6 and that took care of the changing time in the back-end. I still had to change /administrator/components/com_djleague/views/games/tmpl/default.php to flix the correct time of the game in the database.
    <?php echo JFactory::getDate($item->date)->modify('-8 hours')->format('d/m/Y h:i a'); ?>
    Also, the update changed my score table that I had modified to display POS, Team, Played, Won, Drawn, Lost, SF, SA, SD, & Points on the table. Now they are back to the original table with headers of POS, TEAM, Played, POINTS, WON, DRAWN, LOST, SF, SA, & SD. Is there a way I can change the default.php file to get it the way I had it before? See attachment
  • Thank you.
  • Hello,

    it seems that I missed your reply, sorry. The table score columns can now be defined in the component configuration, so you don't need to change layout files to remove some columns and change their order.
    https://www.screencast.com/t/0KAfIZD0gr

    Best
    Szymon
Sign In or Register to comment.