SimplePortal

Customization => Custom Coding => Topic started by: Zirc on September 20, 2010, 12:38:20 AM

Title: Date/Time format question
Post by: Zirc on September 20, 2010, 12:38:20 AM
In the shoutbox and the recent posts blocks it has the time when these items were posted in the format of:

[Full month, date, full year, H:M:S am/pm]

Where would I begin to look to change the format of these items to something like the following:

[Numeric M-D-Y, H:M am/pm]

Thanks.  I have looked in the Recent Posts function in portalblocks.php and it lists $item['date'] and nothing in the function defines the format so it must be elsewhere but I don't know where.
Title: Re: Date/Time format question
Post by: Nathaniel on September 20, 2010, 05:02:02 AM
The easiest solution to this, would be to set the '$user_info['time_offset']' variable at the start of the relevant functions (ie. sp_shoutbox, sp_recent) (store its previous value into a variable first), then set it back to its old value at the end of the function. If the $user_info variable is not listed in the globals at the start of the function, then you will need to add it.
Title: Re: Date/Time format question
Post by: Zirc on September 20, 2010, 10:34:59 AM
Thanks I'll see if i can muddle my way through what you suggested.  My php skills are novice at best so I'm not sure I'll be able to do it but I'll give it a shot.
SimplePortal 2.3.8 © 2008-2024, SimplePortal