Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Vanilla Statistics Time Zone

CsabbencsCsabbencs
edited October 2012 in Vanilla 2.0 - 2.8

Let's say we have 3 different time zones:

1. to where my stats is sent (analytics.vanillaforums.com)

2. in which the server of my vanilla forum lives

3. in which I live (server+my user's hour offset).

Can you tell me to which time zone does the graph's data correspond that I see on dashboard statistics screen?

Comments

  • peregrineperegrine MVP
    edited October 2012

    from: http://php.net/manual/en/function.strtotime.php
    int strtotime ( string $time [, int $now = time() ] )

    The function expects to be given a string containing an English date format and will try to parse that format into a Unix timestamp (the number of seconds since January 1 1970 00:00:00 UTC), relative to the timestamp given in now, or the current time if now is not supplied.

    Each parameter of this function uses the default time zone unless a time zone is specified in that parameter.

    in vanilla stats this sets the one month ago stats.

      $Sender->DayStampStart = strtotime('1 month ago'); // Default to 1 month ago
    
    if you modify vanilla stats temporarily - you will see begin time and date at top of screen in dashboard.
    
    if you add these two lines
      $unixtime = strtotime('1 month ago');
        echo date("m/d/Y h:i:s A T",$unixtime);
    
    to 
     public function Gdn_Dispatcher_BeforeDispatch_Handler($Sender) {
          $Enabled = C('Garden.Analytics.Enabled', TRUE);
    
        $unixtime = strtotime('1 month ago');
        echo date("m/d/Y h:i:s A T",$unixtime);
    
    you will see when your server stats begin for one month ago.
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.