From 59a1174b623f552354e7b038984a1f6cba311f60 Mon Sep 17 00:00:00 2001 From: scoute-dich Date: Sat, 23 Apr 2016 20:58:37 +0200 Subject: [PATCH] new date format for screenshots --- .../github/dfa/diaspora_android/activity/MainActivity.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java b/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java index 36b0d3d0..201a9c29 100644 --- a/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java +++ b/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java @@ -87,6 +87,7 @@ import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; +import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; @@ -629,8 +630,9 @@ public class MainActivity extends AppCompatActivity if (!directory.exists()) { directory.mkdirs(); } + Date date = new Date(); - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd_HH-mm"); + DateFormat dateFormat = android.text.format.DateFormat.getDateFormat(getApplicationContext()); webView.measure(View.MeasureSpec.makeMeasureSpec( View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED), @@ -707,8 +709,9 @@ public class MainActivity extends AppCompatActivity if (!directory.exists()) { directory.mkdirs(); } + Date date = new Date(); - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd_HH-mm"); + DateFormat dateFormat = android.text.format.DateFormat.getDateFormat(getApplicationContext()); webView.measure(View.MeasureSpec.makeMeasureSpec( View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED),