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.
Options

Change time format

edited February 2012 in Vanilla 2.0 - 2.8

Hi all.

I want to change the timeformat on my forum. Now is it showing 8.20 PM and i want that it shows 20:20. How can I make it?

Tagged:

Best Answer

  • Options
    x00x00 MVP
    Answer ✓

    Sorry there are two competing formats, I got confused.

    change

    $Definition['Date.DefaultTimeFormat'] = '%H:%M';
    $Definition['Date.DefaultDateTimeFormat'] = '%B %e, %Y %H:%M';
    

    and remove the other definitions.

    grep is your friend.

Answers

  • Options

    You need to set Date.* in your locale.

     $Definition['Date.DefaultFormat'] = '%B %e, %Y';
     $Definition['Date.DefaultDayFormat'] = '%B %e';
     $Definition['Date.DefaultYearFormat'] = '%B %Y';
     $Definition['Date.DefaultTimeFormat'] = '%l:%M%p';
     $Definition['Date.DefaultDateTimeFormat'] = '%B %e, %Y %l:%M%p';
    

    where %B replace with %G:%i

    grep is your friend.

  • Options

    Something like this? it doesn't work :(

    $Definition['Date.DefaultDayFormat'] = '%G:%i %e';

    $Definition['Date.DefaultFormat'] = '%G:%i %e, %Y';
    $Definition['Date.DefaultTimeFormat'] = '%l:%M%p';
    $Definition['Date.DefaultDateTimeFormat'] = '%G:%i %e, %Y %l:%M%p';

  • Options
    x00x00 MVP
    Answer ✓

    Sorry there are two competing formats, I got confused.

    change

    $Definition['Date.DefaultTimeFormat'] = '%H:%M';
    $Definition['Date.DefaultDateTimeFormat'] = '%B %e, %Y %H:%M';
    

    and remove the other definitions.

    grep is your friend.

  • Options

    nothing happens :(

  • Options

    Now its working thank you very much :)

  • Options
    x00x00 MVP
    edited February 2012

    no worries

    grep is your friend.

Sign In or Register to comment.