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

After importing from phpBB3 - Timestamps only show month and year

unixherounixhero
edited August 2012 in Vanilla 2.0 - 2.8

Hi

I successfully imported a forum database from phpBB3 to VanillaForums.
I have a question regarding timestamps, all of my old posts show $Month $Year instead of the full time and date, as they did
in phpBB3. So a post from 2004 says September 2004 instead of 16:31 10.09.2004 (or similar).

I have seen a similar support request about this in the forums, but that wasn't resolved (I think).

Best Answers

  • Options
    x00x00 MVP
    edited August 2012 Answer ✓

    in conf/locale.php put the lines

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

    this will output formats like

    Aug 2, 2004 - 7:23PM

    for the the current year it will format

    Aug 2 - 7:23PM

    grep is your friend.

  • Options
    x00x00 MVP
    Answer ✓

    sorry that should be

    $Definition['Date.DefaultDayFormat'] = '%b %e - %l:%M%p';

    grep is your friend.

Answers

  • Options
    422422 Developer MVP
    edited August 2012

    I think @x00 or @peregrine are the guys who can help best

    There was an error rendering this rich post.

  • Options

    this sound more like the output format, which can be set. Check in the database to see if you are missing that data.

    grep is your friend.

  • Options
    unixherounixhero
    edited August 2012

    The database has all the data, if I look at a post, it has this timestamp in the database, "2004-08-06 07:23:32" but is only reported in the forum as "August, 2004".

    Any clues as to where can the output format be set?
    theme: default
    version: 2.0.18.4

  • Options

    unixhero said:
    I have seen a similar support request about this in the forums, but that wasn't resolved (I think).

    Oh, good, then you can show the Url of that discussion thread.

    There was an error rendering this rich post.

  • Options
    x00x00 MVP
    edited August 2012 Answer ✓

    in conf/locale.php put the lines

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

    this will output formats like

    Aug 2, 2004 - 7:23PM

    for the the current year it will format

    Aug 2 - 7:23PM

    grep is your friend.

  • Options

    UnderDog said:

    unixhero said:
    I have seen a similar support request about this in the forums, but that wasn't resolved (I think).

    Oh, good, then you can show the Url of that discussion thread.

    Sure, it's here: http://vanillaforums.org/discussion/20963

  • Options

    This not really anything to do phpBB import

    The format that they want to change this the default behaviour, and I’d say it is superior.

    Who the hell cares if it was posted in 07:23:32 back in August 8 2004?

    Of course there are exceptions, but it is down to personal preference really.

    grep is your friend.

  • Options
    x00x00 MVP
    Answer ✓

    sorry that should be

    $Definition['Date.DefaultDayFormat'] = '%b %e - %l:%M%p';

    grep is your friend.

  • Options
    unixherounixhero
    edited August 2012

    x00 said:
    This not really anything to do phpBB import

    The format that they want to change this the default behaviour, and I’d say it is superior.

    Who the hell cares if it was posted in 07:23:32 back in August 8 2004?

    Of course there are exceptions, but it is down to personal preference really.

    Yes I realize this in hinsight.

    To answer your question:

    Who the hell cares if it was posted in 07:23:32 back in August 8 2004?

    Absolutely all of my users. Precision is key! It starts to matter when you use the forum as a historical record. Or when your users becomes so involved that the forum becomes a historical record.

  • Options

    Ok, this has to do with how the dates are presented, now I get it :-)

    If nothing is wrong in the database, like I thought before, focus on the difference between the recent dates and the really old dates.

    You either see 'August 6' (for a recent date) or 'September 2009' for a really old date.

    There are a couple of threads regarding how that date is shown, try to find them here on the forum :-)

    There was an error rendering this rich post.

Sign In or Register to comment.