Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
After February 6, this site will no longer have Facebook, Twitter, or OpenID sign-in options. Read our announcement about social media SSO support in 2.8 for more info.

Make sure you have a current, valid email address set in your profile and set a password so you can login without it. If you get locked out after that time, you can choose "Forgot Password" to fix it as long as a valid email is on your account.
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

Time zones

I've been reading the forums about some time zone fixes, and there are a few different 'fixes' and 'hacks' or work arounds to get time zones to show correctly.

Can someone please tell me what is the current fix for time zones? I could not find a plugin that allowed me to update/fix/change the time zones, and config.php does not have any time zone information in it.

Equally, the supported time zones is rather long, and if I have to go through and put in every time zone, ouch...

Comments

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    This comment from peregrine seems to be the answer to your question: http://vanillaforums.org/discussion/comment/212339/#Comment_212339

    hgtonight
  • @R_J said:
    This comment from peregrine seems to be the answer to your question: http://vanillaforums.org/discussion/comment/212339/#Comment_212339

    So, I see that, but as I said in my last statement, I am looking for a way that does not require me enter some god awful number of time zones... that just seems ludicrous.

  • peregrineperegrine MVP
    edited August 2014

    @Dariuas

    you may see it but you don't understand it apparently. (or we have no idea what you want to do, spell it out exactly where and what, under what conditions, logged in or not).

    all non-logged in users will see what ever time zone you set via the config statement.

    All logged in users will see the time of the world that they live in (if it is a timezone based on hours - half-hour timezones don't work.

    what time zone do you want for non-logged in users?

    because logged in users will see everything based on their own timezone.

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

  • DariuasDariuas New
    edited August 2014

    I want everyone not logged in to see PST, but I want my logged in u sers to see their time zone. I am logged in, and see 1:22am:

    https://www.dropbox.com/s/o0s3658fkt5v4ec/Timezone.PNG

    Also on these forums, it shows 8:24pm, but its actually 9:24pm here on the east coast.

  • peregrineperegrine MVP
    edited August 2014

    add this to your config.

    $Configuration['Garden']['GuestTimeZone'] = 'America/Los_Angeles';

    and make sure you didn't change bootstrap or ini_set your time zone in any vanilla programs manually, or alter anything relating to offset in your js.

    I want everyone not logged in to see PST, but I want my logged in users to see their time zone.

    that is how it works out of the box with a config.

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

  • DariuasDariuas New
    edited August 2014

    I changed what you said, and it did not update.
    Also, I checked my bootstrap, its got date_default_timezone_Set('UTC');

    But when I change that to PST/EST, or what ever, the time just goes away :confounded:

  • peregrineperegrine MVP
    edited August 2014

    PST/EST - PST/EST is not a timezone that is used.

    what city in the world do you want it set to.

    if you want east coast then change your config.php and log out. and check the time.

    $Configuration['Garden']['GuestTimeZone'] = 'America/New_York';

    it's really not hard!

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

  • So refreshing has no impact on it (I figured out the America/New York bit :P)

    However, even that change did not play a role in it at all, it still shows me UCT time.

    Maybe I am missing something, this seems super straight forward.

    I added the line:

    $Configuration['Garden']['GuestTimeZone'] = 'America/New_York';
    to my config.php under the /config folder, saved it, logged out then back in, made a new post, still showing UCT time (2:02 am; current it is 10:02pm for me)

  • What is the time whey you are not logged in?

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

  • PST when they are not logged in (so I changed the New_York back to LA)

    But when logged in, it should show local time, as you suggested; its not. As my SS shows.

    Sorry to be a hassle!

  • set the houroffset in the user table should be -7 for you.

    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 just looked at my SQL tables, everyone is set to 0. I will update them all, but why is 0 the generic?
    1.

  • @Dariuas are you on 2.2 aka master ?

    If yes, you need to update for the timezones to work:
    https://github.com/vanilla/vanilla/commit/005f2e0b6ebf9fbf288e5d750bca8f962988f787

    My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations

    R_Jperegrine
  • DariuasDariuas New
    edited August 2014
  • It looks like the new definition list also made it in 2.1.1

    https://github.com/vanilla/vanilla/commit/03d3ee826a8505bf9cee88626c95aa676eea9ec8

    So it's a bug.
    You could fix it by applying the change I linked to in my previous posting and the correct houroffset should be automatically set for all users.

    My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations

  • Okay, I've committed those changes, I will have to toy with it when I get to work.

    A rather obvious side bar: I am obviously rather new to this whole concept of web design, so this question may strike you as a bit odd. I am trying to edit the URL that the banner returns you to. I can't seem to locate the <a href=" any where.

  • peregrineperegrine MVP
    edited August 2014

    banners don't have anything to do with time zones.

    but you can change the link in default.master.tpl.

        <div class="Banner">
            <div class="Row">
              <strong class="SiteTitle"><a href="http://youforum.com/specialpage">{logo}</a></strong>
    

    thanks by the way.

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

  • DariuasDariuas New
    edited August 2014

    @peregrine said:
    banners don't have anything to do with time zones.

    thanks by the way.

    Oh I know they don't have anything, it was a separate seaway that I've been trying to figure out here this morning. Someone pointed out an issue w/ my forums, and I was typing a message as that came through.

    You are welcome, though I am not quiet sure for what :)

  • peregrineperegrine MVP
    edited August 2014

    You are welcome, though I am not quiet sure for what

    Oh, I just try to thank people when they provide help, I was thanking @Bleistivt for the comment, since I noticed new test users as well didn't get the hour offset correctly changed.

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

  • Ahhhhhh I got you. Well, so far everything looks fine, I'll be checking it more today.

    Also, thank you Peregrine, for the Registration mod it makes me feel safer with my forums. The last time I ran Vanillia forums, I neglected to add security measures, and got shut down because of 40k+ user/spam submissions.

  • You are welcome,

    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 August 2014

    @Linc‌

    Can you replicate the problem on vanilla 2.1.1 if a new user is added via applicant approval (at the very least) the houroffset is not correct and does not seem to update to the correct users houroffset when they logout and log back in.

    meaning the houroffset stays at 0. I am logging in to a localhost which is set on my timezone via OS, but have not made changes to vanilla code php or js.

    Old users added seem to be the correct hour offset.

    I am only talking about logged in time. Guest users reflect the correct timezone with the config statement.

    Maybe this is what Todd attempted to fix in Master.
    https://github.com/vanilla/vanilla/commit/005f2e0b6ebf9fbf288e5d750bca8f962988f787

    as indicated by Bleistivt

    hind of seems like a priority issue, if I and a few others are not the only ones noticing issue.

    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.