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.

incorrect time zone when logged out

my bootstrap.php
// Make sure a default time zone is set date_default_timezone_set('Asia/Colombo');

my js/global.js
var offsetServer= -5; var d = new Date() var hourOffset = -Math.round(d.getTimezoneOffset() / 60) +offsetServer;

and my php.ini
date.timezone = Asia/Colombo

under the those settings when i log in time is working correctly

but when logged out time is incorrect (extra 5 hours have been added incorrectly)

Comments

  • peregrineperegrine MVP
    edited July 2015

    Did you read question 1 in the FAQ?

    http://vanillaforums.org/discussion/comment/218971/#Comment_218971
    http://vanillaforums.org/discussion/28420/faq-what-frequently-asked-questions/p1

    the above links should solve your problem. assuming you are using vanilla 2.1.x or above.


    2 rules to help you out.

    • 1) don't change bootstrap.php - use the original that came with core.
    • 2) don't change global.js - use the original that came with core.

    Bonus and important:

    get the bootstrap.php and global.js from the original core and don't change them.

    should fix everything

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

  • I already usin that code
    $Configuration['Garden']['GuestTimeZone'] = "Asia/Colombo";
    But not working for me .. time zone displaying incorrecty with + 5 hours :(

  • ..

  • peregrineperegrine MVP
    edited July 2015

    @DmcBoos said:
    ..

    Did you correct your bootstrap.php and global.js.

    reinstall those two programs from original source.

    it should fix new posts once you do so and you have the config.php correct.

    However, it will not reflect 1/2 hour timezones (this is a bug in vanilla).

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

  • peregrineperegrine MVP
    edited July 2015

    what version number of vanilla are you using?

    http://vanillaforums.org/discussion/comment/199091/#Comment_199091

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

  • @peregrine said:

    However, it will not reflect 1/2 hour timezones (this is a bug in vanilla).

    hmm plzz fix this bug ... now - 30 min displaying incorrecty..

    i reinstall those two programs from original source.

  • @DmcBoos said:
    i reinstall those two programs from original source.

    I'm running on Bristol time how do you think I feel? I am from the 19th century though.

    grep is your friend.

  • peregrineperegrine MVP
    edited July 2015

    @DmcBoos said:
    i reinstall those two programs from original source.

    good for you - you followed the instructions at last.

    @peregrine said:

    However, it will not reflect 1/2 hour timezones (this is a bug in vanilla).

    hmm plzz fix this bug ... now - 30 min displaying incorrecty..

    I believe they have placed this on the fast-track for vanilla 5.x scheduled to come out within a decade or two.

    In the meantime you can

    1) move to a country that has 1 hour time zones.
    2) adjust your schedule by 1/2 hour
    3) wait until you are 90 years old, by that time problem should be fixed.
    4) change you time zone column in table to decimal
    5) petition your country to change their time zone.
    6) write a plugin that changes the displayed time by 1/2 hour,

    https://github.com/vanilla/vanilla/issues/1626

    it is a sliding enhancement. added , removed added removed.....

    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.