Skip to content

Commit 32d1fec

Browse files
Dianne Hackbornandroid code review
authored andcommitted
Merge "Fixes relative time formatting issue for dates in future"
2 parents 03d16e1 + ca33637 commit 32d1fec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/java/android/text/format/DateUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1618,7 +1618,7 @@ public static CharSequence getRelativeTimeSpanString(Context c, long millis,
16181618

16191619
String result;
16201620
long now = System.currentTimeMillis();
1621-
long span = now - millis;
1621+
long span = Math.abs(now - millis);
16221622

16231623
synchronized (DateUtils.class) {
16241624
if (sNowTime == null) {

0 commit comments

Comments
 (0)