Index: trunk/phase3/languages/Language.php |
— | — | @@ -2847,12 +2847,26 @@ |
2848 | 2848 | } elseif ( $seconds < 60 ) { |
2849 | 2849 | return $this->formatNum( round( $seconds ) ) . ' ' . wfMsg( 'seconds-abbrev' ); |
2850 | 2850 | } elseif ( $seconds < 3600 ) { |
2851 | | - return $this->formatNum( floor( $seconds / 60 ) ) . ' ' . wfMsg( 'minutes-abbrev' ) . ' ' . |
2852 | | - $this->formatNum( round( fmod( $seconds, 60 ) ) ) . ' ' . wfMsg( 'seconds-abbrev' ); |
| 2851 | + $minutes = floor( $seconds / 60 ); |
| 2852 | + $secondsPart = round( fmod( $seconds, 60 ) ); |
| 2853 | + if ( $secondsPart == 60 ) { |
| 2854 | + $secondsPart = 0; |
| 2855 | + $minutes++; |
| 2856 | + } |
| 2857 | + return $this->formatNum( $minutes ) . ' ' . wfMsg( 'minutes-abbrev' ) . ' ' . |
| 2858 | + $this->formatNum( $secondsPart ) . ' ' . wfMsg( 'seconds-abbrev' ); |
2853 | 2859 | } else { |
2854 | 2860 | $hours = floor( $seconds / 3600 ); |
2855 | 2861 | $minutes = floor( ( $seconds - $hours * 3600 ) / 60 ); |
2856 | 2862 | $secondsPart = round( $seconds - $hours * 3600 - $minutes * 60 ); |
| 2863 | + if ( $secondsPart == 60 ) { |
| 2864 | + $secondsPart = 0; |
| 2865 | + $minutes++; |
| 2866 | + } |
| 2867 | + if ( $minutes == 60 ) { |
| 2868 | + $minutes = 0; |
| 2869 | + $hours++; |
| 2870 | + } |
2857 | 2871 | return $this->formatNum( $hours ) . ' ' . wfMsg( 'hours-abbrev' ) . ' ' . |
2858 | 2872 | $this->formatNum( $minutes ) . ' ' . wfMsg( 'minutes-abbrev' ) . ' ' . |
2859 | 2873 | $this->formatNum( $secondsPart ) . ' ' . wfMsg( 'seconds-abbrev' ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -140,6 +140,7 @@ |
141 | 141 | to enhance preference grouping. |
142 | 142 | * (bug 23298) Interwiki links with prefix only in log summaries now link to the |
143 | 143 | correct link |
| 144 | +* (bug 23284) Times are now rounded correctly |
144 | 145 | |
145 | 146 | === API changes in 1.17 === |
146 | 147 | * (bug 22738) Allow filtering by action type on query=logevent |