WordPress.org

Ready to get started?Download WordPress

Forums

Page View Count
Change time when views per day is reset? (4 posts)

  1. sukalac
    Member
    Posted 9 months ago #

    How can I change the time when the number of views per day is reset? It appears to cycle at 0:00 UTC, but I would prefer it cycled at midnight local time.

    Thanks,
    Ron Sukalac

    http://wordpress.org/plugins/page-views-count/

  2. Babyhersh
    Member
    Posted 8 months ago #

    I need this answer too. My number of views resets itself in the afternoon instead of at midnight. I would really like to have this issue solved.

    Thank you for your time and effort to help.
    Leesa
    http://www.twitterpersians.com

  3. komments
    Member
    Posted 2 weeks ago #

    Has anyone received a response to this?

  4. sukalac
    Member
    Posted 2 weeks ago #

    I never heard back anything on this but I added a patch that seems to have fixed the problem for me. In the plugin init function I added the date_default_timezone_set call as below. The actual zone should be set to your local time setting:

    function a3_pvc_plugin_init() {
    	if ( get_option('pvc_just_installed') ) {
    		delete_option('pvc_just_installed');
    		wp_redirect( admin_url( 'options-general.php?page=a3-pvc', 'relative' ) );
    		exit;
    	}
    	// Add language
    	load_plugin_textdomain( 'pvc', false, A3_PVC_FOLDER.'/languages' );
    	date_default_timezone_set('America/New_York');	//RS
    }

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.