Title: Strange Timezone
Last modified: August 22, 2016

---

# Strange Timezone

 *  Resolved [Richard B](https://wordpress.org/support/users/richard-b/)
 * (@richard-b)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/strange-timezone/)
 * Great plugin!
 * I’m noticing in contact view that the times recorded do not match the WP installs
   set timezone, is there any way to correct this?
 * [https://wordpress.org/plugins/leadin/](https://wordpress.org/plugins/leadin/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Andy Cook](https://wordpress.org/support/users/andygcook/)
 * (@andygcook)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/strange-timezone/#post-5203462)
 * 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.
 *  [Andy Cook](https://wordpress.org/support/users/andygcook/)
 * (@andygcook)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/strange-timezone/#post-5203802)
 * 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.
 *  [Andy Cook](https://wordpress.org/support/users/andygcook/)
 * (@andygcook)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/strange-timezone/#post-5203804)
 * 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!
 *  [fyrye](https://wordpress.org/support/users/fyrye/)
 * (@fyrye)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/strange-timezone/#post-5203806)
 * 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](https://github.com/WordPress/WordPress/commit/237941babc69a7f4f04b262092096ea120b0bfdb)
 * Emulated behavior: [http://ideone.com/usjocW](http://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');
       ```
   
 *  [Andy Cook](https://wordpress.org/support/users/andygcook/)
 * (@andygcook)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/strange-timezone/#post-5203807)
 * 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](https://wordpress.org/support/users/richard-b/)
 * (@richard-b)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/strange-timezone/#post-5203808)
 * Andy
 * Thanks so much for the fix, can confirm its working for me!
 * Rich
 *  [Andy Cook](https://wordpress.org/support/users/andygcook/)
 * (@andygcook)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/strange-timezone/#post-5203809)
 * [@fyrye](https://wordpress.org/support/users/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: [andy@leadin.com](https://wordpress.org/support/topic/strange-timezone/andy@leadin.com?output_format=md)
 * Cheers!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Strange Timezone’ is closed to new replies.

 * ![](https://ps.w.org/leadin/assets/icon-256x256.png?rev=3041936)
 * [HubSpot All-In-One Marketing - Forms, Popups, Live Chat](https://wordpress.org/plugins/leadin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/leadin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/leadin/)
 * [Active Topics](https://wordpress.org/support/plugin/leadin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/leadin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/leadin/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [Andy Cook](https://wordpress.org/support/users/andygcook/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/strange-timezone/#post-5203809)
 * Status: resolved