Support » Plugin: All-in-One Event Calendar » [Plugin: All-in-One Event Calendar] Times displaying incorrectly on Week View

  • Resolved Scott White

    (@scott-white)


    I am unsure if this is a setting I missed somewhere, but I have checked that the timezone for the WordPress is correct, and it is.
    When looking at the “Week” view on the Calendar, the time list starts at 4 PM and stops at 3PM. The events that we add to the calendar have the correct time listed, but doesn’t appear to show up in the right box on the actual list.
    See http://www.villagegamer.net/images/calendar_times.jpg for an example of what I mean.
    The events are showing up in the right boxes (the one listed as starting at 7 AM is in the 8th box, which would be for events starting at 7 AM) but the times listed down the far left column are way off.
    Is this a bug, or is it a setting I am not noticing somewhere?

    http://wordpress.org/extend/plugins/all-in-one-event-calendar/

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Contributor Yani Iliev

    (@yaniiliev)

    @Scott White
    wow, that’s the first time I’ve seen such issue.

    Let’s try to solve it:
    – What is the timezone in WP Settings?

    Timezone is currently set to “Vancouver”, which is PST.
    The server time is currently set to “America/Vancouver”. Same timezone.
    That’s why I’m not sure why it would have such a discrepancy… the wordpress time actually matches the server exactly (both located in the same timezone). I’m at a loss.

    Plugin Contributor Yani Iliev

    (@yaniiliev)

    @Scott White
    Just to confirm – this the default ai1ec 1.2.2 version.
    You haven’t edited or changed the plugin’s source in anyway, right?

    All that I have changed is the css file (colours)

    Plugin Contributor Yani Iliev

    (@yaniiliev)

    Great, we will have to try a few cases before knowing what is going on:
    1. Can you upload the contents of app/view/week.php file from your server to wordpress.pastebin.com and give it to me?
    2. Can you upload a test.php file to the root of your wordpress and run it in your browser. The contents of test.php are:

    <?php
    require( 'wp-load.php' );
    echo esc_html( date_i18n( get_option( 'time_format', 'g a' ), gmmktime( 0, 0 ) ) );
    ?>

    Let me know the output.

    Thanks!

    The output of test.php is:
    4:00 pm

    Pastbin link is: http://pastebin.com/SKPk8t3F

    Plugin Contributor Yani Iliev

    (@yaniiliev)

    Okay, can you change the test.php file’s contents to this:

    <?php
    require( 'wp-load.php' );
    echo esc_html( date_i18n( 'g a', gmmktime( 0, 0 ) ) );
    ?>

    and let me know the output

    4 pm

    Plugin Contributor Yani Iliev

    (@yaniiliev)

    Doh!
    What’s the output of this:

    <?php
    echo gmdate( "M d Y H:i:s", gmmktime( 0, 0 ) );
    ?>

    Plugin Contributor Yani Iliev

    (@yaniiliev)

    and what is your PHP version?

    PHP 5.3.8 (cli) (built: Dec 30 2011 10:35:28)
    Copyright (c) 1997-2011 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
    with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator
    with the ionCube PHP Loader v4.0.9, Copyright (c) 2002-2011, by ionCube Ltd., and
    with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies
    with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH

    Jan 10 2012 00:00:35 is the new output (sorry, didn’t see you post that, only saw the php version request)

    Plugin Contributor Yani Iliev

    (@yaniiliev)

    ah great, we are getting somewhere 🙂
    Time for a new test, put the following content in test.php and let me know the output:
    http://pastebin.com/5LcTMvHA

    date_i18n( ‘g a’ ): 4 pm
    without esc_html: 4 pm
    date_i18n with gmt set: 12 am
    F j, Y g:i a : January 9, 2012 4:00 pm

    Plugin Contributor Yani Iliev

    (@yaniiliev)

    There it is!

    Edit: app/view/week.php
    Line: 93
    From: <div><?php echo esc_html( date_i18n( $time_format, gmmktime( $hour, 0 ) ) ) ?></div>
    To: <div><?php echo esc_html( date_i18n( $time_format, gmmktime( $hour, 0 ), true ) ) ?></div>

    Let me know if it solves it for you.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘[Plugin: All-in-One Event Calendar] Times displaying incorrectly on Week View’ is closed to new replies.