Function timeformat
Format a time to make it look purdy.
- returns a pretty formatted version of time based on the user's format in $user_info['time_format'].
- applies all necessary time offsets to the timestamp, unless offset_type is set.
- if todayMod is set and show_today was not not specified or true, an alternate format string is used to show the date with something to show it is "today" or "yesterday".
- performs localization (more than just strftime would do alone.)
Package: SMF
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Subs.php
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Subs.php
integer |
$log_time |
A timestamp |
boolean |
$show_today = true |
Whether to show "Today"/"Yesterday" or just a date |
boolean|string |
$offset_type = false |
If false, uses both user time offset and forum offset. If 'forum', uses only the forum offset. Otherwise no offset is applied. |
boolean |
$process_safe = false |
Activate setlocale check for changes at runtime. Slower, but safer. |
string
|
A formatted timestamp |