Viewing 7 replies - 1 through 7 (of 7 total)
  • Greetings, Richard!

    Thanks so much for the positive words ??

    The timezone issue you uncovered is a known bug that we’re hoping to fix soon.

    Sorry for the annoyance and I’ll make sure to circle back with you personally once we resolve the problem.

    Hi Richard –

    I just wanted to let you know we fixed this bug in the next version of the plugin which we are hopefully launching tomorrow or early Monday.

    I’ll circle back here when we push the fix to let you know when it’s live.

    Hi Richard –

    Just a quick follow up that the timezone issue is now fixed if you update to Leadin 2.2.0. We admittedly did forgot to apply the patch to the contact timeline view, but we’re pushing out a new minor version today which includes that bug fix.

    I’m going to mark this as resolved and please let me know if the patch doesn’t take care of the timezone problem for you. Thanks again for letting us know!

    It appears to have broken time reporting functionality from 2.2.0 in WordPress < 3.9.

    2.2.1 reports 1970 dates despite records in database being correct.
    2.2.0 reports correct dates but incorrect times.

    See current_time in functions, expects argument 1 $type as string [“mysql”|”timezone”]: and does not have default added until 3.9
    https://github.com/WordPress/WordPress/commit/237941babc69a7f4f04b262092096ea120b0bfdb

    Emulated behavior: https://ideone.com/usjocW

    /* /plugins/leadin/inc/leadin-functions.php:872 */
    strtotime(current_time('Y-m-d H:i:s'));
    /* /wp-includes/functions.php */
    function current_time( $type, $gmt = 0 ) {
    	switch ( $type ) {
    		case 'mysql':
    			return ( $gmt ) ? gmdate( 'Y-m-d H:i:s' ) : gmdate( 'Y-m-d H:i:s', ( time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) );
    			break;
    		case 'timestamp':
    			return ( $gmt ) ? time() : time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );
    			break;
    	}
    }

    Used correctly in

    /* /wp/includes/admin/leadin-admin.php:256 */
    $this->leadin_header('Leadin Stats: ' . date('F j Y, g:ia', current_time('timestamp')), 'leadin-stats__header');

    Hi fyrye –

    Thanks for pointing this out. We admittedly didn’t realize that current_time doesn’t pass a default in version < 3.9 and will be implementing a fix in the next minor version of Leadin. I’ll make sure to post back here when the patch is live and thanks again!

    – Andy

    Thread Starter Richard-B

    (@richard-b)

    Andy

    Thanks so much for the fix, can confirm its working for me!

    Rich

    @fyrye – I rolled in your patch to the latest version of Leadin which is shipping to the plugin directory today. Thanks so much for the detailed response and corresponding fix!

    Do you mind shooting me an email when you get a chance: [email protected]

    Cheers!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Strange Timezone’ is closed to new replies.