#521 closed defect (fixed)
Audit bbPress' time functions.
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | highest | Milestone: | 0.8 |
| Component: | Administration | Version: | 0.7.3 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Should be stored as GMT is DB.
Look at bb_offset_time(), bb_since(), all the filters on topic_time, time zone stuff, etc.
Change History (6)
- Resolution set to fixed
- Status changed from new to closed
How it works:
Template functions
- Time functions return "X (hours|weeks|etc) ago" of current global object by default.
- Passing numeric argument returns time for object with that id.
- Passing date-format-string argument returns time formatted accordingly for current global.
- Can also pass, 'timestamp', 'since' (default), and 'mysql' for unix time, "X hours ago" or mysql formatted date.
- Can pass query string or array with keys: id, format, more. More returns "X hours, Y minutes" if format = 'since'.
Backend
- bb_since(), bb_offset_time(), bb_gmtstrtotime(), should accept unix time stamps, mysql formatted strings and some other strings.
- gmdate() used exclusively no more date().
- bb_gmtstrtotime() converts mysql dates (assumed to be GMT as all dates/times in bbPress are) into unix time stamp.
- bb_offset_time() filtering all echoing time functions but only actually applied by if format != 'since'.
- Calling bb_since() twice shouldn't break the date.
- echoing and returning functions both pass mysql formatted time to filters no matter what (and expect [but probably don't need] to have filters return mysql formatted dates).
- _bb_parse_time_function_args() and _bb_time_function_return() helper functions.
Note: See
TracTickets for help on using
tickets.
#516