#692 closed defect (bug) (fixed)
bp_core_time_since returns '-1 years, 12 months' for future date
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | major | |
| Severity: | Version: | 1.0 | |
| Component: | Keywords: | has-patch | |
| Cc: |
Description
The function "bp_core_time_since" returns '-1 years, 12 months' when $older_date is future from the current time.
This output is ugly. I suggest using "0" or "Future" for this cases.
$since = $newer_date - $older_date;
if ( $since < 0 ) {
$output = '0 ' . __( 'seconds', 'buddypress' );
return $output;
}
This situation happens as below:
If the settings of time zone of the server and Wordpress is not matched, the registration date of a user is recored as future (ex: Server uses GMT, WordPress uses JST, nine hours diferrences will occur)
Change History (2)
Note: See
TracTickets for help on using
tickets.
(In [1413]) Added message to tell admins to adjust their WordPress time zone to match their server time zone. Fixes "-1 year" time since problem. Fixes #692