Recent Topics

1 Aug 10, 2005 21:39    

Is it possible to edit the format of the timestamp as it appears on the blog? I'd like to get rid of the seconds so that it shows the standard "10:00 pm" format.

2 Aug 11, 2005 00:44

Yes, there are two ways to do this. The easiest way is to go into the backoffice and go to the Setting tab, then the Regional subtab. Find the time format for your default locale and edit to be 'g:h a'.

Now, if that doesn't work, then maybe your skin is calling the date function and specifying a date format (rather than using the default value, which is set in the backoffice.) If this is the case, or if you just want to have different date formats for different blogs (or even within the same blog), then you need to edit the skin. Open up /skins/whatever-skin-you-are-using/_main.php and look for the date function. It will be something like $Item->issue_date(); or $Item->issue_time();, depending on which one you want to change. Then, inside the parenthesis you'll add your date/time format in quotes. So, to do what you described, you would make it look like this:

$Item->issue_time( 'g:h a);


b2evolution uses the standard php time format characters. You can see them all [url=http://us3.php.net/date]here[/url].

3 Aug 11, 2005 17:24

Like a charm. Thanks!


Form is loading...