• Resolved jscongdon

    (@jscongdon)


    I know that many versions ago, there was a timezone bug fix. As of today I still get a scheduled moniker for a document posted with a current date.
    They only way I’ve been able to get around this is to change the date to a previous date. I do not see any options for changing time / timezone options in the settings area.
    Also, if a document can be scheduled for visibility, could we get a timestamp as well?

Viewing 15 replies - 1 through 15 (of 28 total)
  • Plugin Author bhaldie

    (@bhaldie)

    Your timezone is based on WordPress timezone which is found in Dashboard > Settings > General > Timezone

    Whatever you have set this too should be the timestamp posted on the document.

    Check that setting out and see what you have set your timezone too.

    Thread Starter jscongdon

    (@jscongdon)

    I’m on the east coast, and have the timezone set to New York.
    When I post a document, it puts the time 4 hours ahead … so a test post I just submit was time stamped July 25 2017 3:39 pm

    Plugin Author bhaldie

    (@bhaldie)

    a normal post or a mdocs post?

    Thread Starter jscongdon

    (@jscongdon)

    mdocs

    Plugin Author bhaldie

    (@bhaldie)

    try changing your timezone to UTC-5 and see what the results are.

    Thread Starter jscongdon

    (@jscongdon)

    The problem with that is that I will have to change the setting every time DST is altered.
    Either way, that did not correct it. Updated time is 4:14pm

    Plugin Author bhaldie

    (@bhaldie)

    the times of your normal posts are correct, or are they off too?

    Thread Starter jscongdon

    (@jscongdon)

    They are correct.

    Plugin Author bhaldie

    (@bhaldie)

    Now I want you to goto the mdocs Dashboard > Test Server Compatibility.

    And tell me if you have any unsupported values.

    Thread Starter jscongdon

    (@jscongdon)

    All green checks

    Plugin Author bhaldie

    (@bhaldie)

    We need to narrow in on the problem.. I need you to check an mdocs post from the dashboard and see if its time is off by 4 hours as well.

    Thread Starter jscongdon

    (@jscongdon)

    Ok, just found out how to list those…
    mDocs Post section… after load, it just gives a date – says Scheduled and hovering over the date displays the date (today)/ timestamp of 4:14:52 pm

    Plugin Author bhaldie

    (@bhaldie)

    very weird scenario, here is the function that is setting the time:

    
    function mdocs_format_unix_epoch($gmdate=null) {
    	date_default_timezone_set('UTC');
    	if($gmdate == null) $gmdate = time();
    	$date_format = get_option('mdocs-date-format');
    	$formated_dates = array();
    	$formated_dates['gmdate'] = $gmdate;
    	$formated_dates['date'] = $gmdate+MDOCS_TIME_OFFSET;
    	$formated_dates['formated-date'] = date($date_format, $formated_dates['date']);
    	$formated_dates['wp-date'] = date('Y-m-d H:i:s', $formated_dates['date']);
    	$formated_dates['wp-gmdate'] = date('Y-m-d H:i:s', $gmdate);
    	return $formated_dates;
    }
    

    which is basically setting the time() to the server time then adding or subtracting from the global setting wp-time-offset.

    What time is your server set to?

    Thread Starter jscongdon

    (@jscongdon)

    The server has a default timezone of America/Chicago and is running one hour behind me.
    My time right now is 18:49 and the server reports 17:49

    Plugin Author bhaldie

    (@bhaldie)

    we are going to need to edit some code open the file mdocs-functions.php find the function mdocs_format_unix_epoch and remove the constant MDOCS_TIME_OFFSET it should look like this:

    
    function mdocs_format_unix_epoch($gmdate=null) {
    	date_default_timezone_set('UTC');
    	if($gmdate == null) $gmdate = time();
    	$date_format = get_option('mdocs-date-format');
    	$formated_dates = array();
    	$formated_dates['gmdate'] = $gmdate;
    	$formated_dates['date'] = $gmdate;
    	$formated_dates['formated-date'] = date($date_format, $formated_dates['date']);
    	$formated_dates['wp-date'] = date('Y-m-d H:i:s', $formated_dates['date']);
    	$formated_dates['wp-gmdate'] = date('Y-m-d H:i:s', $gmdate);
    	return $formated_dates;
    }
    
Viewing 15 replies - 1 through 15 (of 28 total)
  • The topic ‘Scheduled Document’ is closed to new replies.