Weekly Class Schedule
[resolved] Todays classes wrong for my time zone (2 posts)

  1. frumbert
    Posted 3 years ago #

    The todays classes widget shows classes for yesterday, up until mid morning, at which point it lists the classes that i have today. My server is in the US but i am in australia. How can i change the plugin so that it has the timezone that i am in not the timezone the server is in (which i cannot change)?


  2. frumbert
    Posted 3 years ago #

    Answering my own question here, but I trawled around the net and found this snippet of code, which I put into /wp-content/plugins/weekly-class-scheudule/models/WcsTodayClassesWidget.php

    $today = date( 'w', strtotime( 'now' ) );


    $date = new DateTime();
    $date->setTimezone(new DateTimeZone('Australia/Sydney'));
    $today = $date->format('w');

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Weekly Class Schedule
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic