[Android] src: Show times in the universal time format

Edward Wang git at videolan.org
Thu Aug 2 04:20:27 CEST 2012


android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Wed Aug  1 22:18:53 2012 -0400| [8768827a6416e88104b6deec540298320c08c27f] | committer: Edward Wang

src: Show times in the universal time format

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=8768827a6416e88104b6deec540298320c08c27f
---

 vlc-android/src/org/videolan/vlc/Util.java |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/Util.java b/vlc-android/src/org/videolan/vlc/Util.java
index c990e9b..866490e 100644
--- a/vlc-android/src/org/videolan/vlc/Util.java
+++ b/vlc-android/src/org/videolan/vlc/Util.java
@@ -28,7 +28,9 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.text.DecimalFormat;
+import java.text.NumberFormat;
 import java.util.HashSet;
+import java.util.Locale;
 import java.util.Properties;
 
 import android.content.Context;
@@ -126,7 +128,8 @@ public class Util {
         int hours = (int) millis;
 
         String time;
-        DecimalFormat format = new DecimalFormat("00");
+        DecimalFormat format = (DecimalFormat)NumberFormat.getInstance(Locale.US);
+        format.applyPattern("00");
         if (millis > 0) {
             time = (negative ? "-" : "") + hours + ":" + format.format(min) + ":" + format.format(sec);
         } else {



More information about the Android mailing list