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.

Timezone configuration - How?

phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
edited July 2010 in Vanilla 2.0 - 2.8
Hi all,

I use Vanilla in Austria and would like to change the timezone settings, as they appear wrong.

The 2nd thing is that i'd like to configure 0:00-24:00 timeframe in opposition to am/pm, so i wondered if there is an option to reconfigure this setting.

Thanx for help,
p*
  • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
  • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
Tagged:

Comments

  • phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
    Uh, nobody knows anything about this?

    Would be nice to see some suggestions, thanx.
    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • Same problem for me !
  • ToddTodd Chief Product Officer Vanilla Staff
    edited July 2010
    When users log in javascript sends their current time to the server to set the timezone. You should be seeing the correct times on your posts. If you aren't can you tell me what browser/version/os you are using?

    To change the format of your times you can add the following to your /conf/config.php:
    $Configuration['Date']['DefaultTimeFormat'] = '%H:%M';
    There are other config settings for date/time formats too:
    Date.DefaultDayFormat
    Date.DefaultYearFormat
    Date.DefaultFormat

    For all the options in date/time formats see strftime.
  • DoudouDoudou New
    edited July 2010
    $Configuration['Date']['DefaultTimeFormat'] = '%H:%M';

    It don't work for me...
  • Yep, same here. I added
    $Configuration['Date']['DefaultTimeFormat'] = '%H:%M';
    $Configuration['Date']['DefaultDayFormat'] = '%e. %B';
    to config.php but it doesn't seem to change anything. Maybe I didn't do it right?
  • BTW: this post loads with just a "100 older" link. I have to press it to view the discussion items. Bug, right?
  • phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
    Yup, doesn't work for me too ? :)
    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • ToddTodd Chief Product Officer Vanilla Staff
    Okay guys, sorry about this. I'll look into this. I went into the code, but didn't check to see if it works. I'll post back when I've figured it out.
  • ToddTodd Chief Product Officer Vanilla Staff
    @fredrikstai, Yup, that's a bug in our voting plugin and it will be addressed shortly. The forum without the plugin works fine though.
  • ToddTodd Chief Product Officer Vanilla Staff
    edited July 2010
    Okay, I found the correct way to change your formats. They aren't a config option, but a language option. So you can put the formats for your dates in a language pack. If you just want to change the default language pack (en-CA) then do the following:
    1. Create a file called /conf/locale-en-CA.php
    2. Put the following in the file:
    <?php if (!defined('APPLICATION')) exit();
    $Definition['Date.DefaultTimeFormat'] = '%H:%M';
    $Definition['Date.DefaultDayFormat'] = '%e. %B';
  • ToddTodd Chief Product Officer Vanilla Staff
    @phreak, I'll have to get the default timezone into the config. Good find.
  • @Todd Have you some news about time format 0:00-24:00 ?
  • ToddTodd Chief Product Officer Vanilla Staff
    Yes I do, I just posted the answer this morning above.
  • DoudouDoudou New
    edited July 2010
    Thanx @Todd y have not see it, it works !

    Could you tell me how can i translate months in french ?
  • ToddTodd Chief Product Officer Vanilla Staff
    I think you might need your actual server to be French, but I'm not sure. If you post a Github issue it will be on our radar.

    http://github.com/vanillaforums/Garden/issues
  • phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
    edited August 2010
    Can anyone help me, switching the month names into another language?
    Thanx for help!
    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • @Todd i have tried your solution but it does not work. Here is how i got it to work:

    Go the root of your forum folders -> open 'conf' -> open 'locale.php' -> the file needs to look like this:
    <?php if (!defined('APPLICATION')) exit();
    $Definition['Date.DefaultTimeFormat'] = '%H:%M';
    $Definition['Date.DefaultDayFormat'] = '%e. %B';
Sign In or Register to comment.