Support » Plugin: Weekly Class Schedule » Todays classes wrong for my time zone

Viewing 1 replies (of 1 total)
  • 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

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

    with:

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

Viewing 1 replies (of 1 total)
  • The topic ‘Todays classes wrong for my time zone’ is closed to new replies.