|
26 | 26 | import org.schabi.newpipe.util.ThemeHelper; |
27 | 27 | import org.schabi.newpipe.util.external_communication.ShareUtils; |
28 | 28 |
|
29 | | -import java.time.LocalDateTime; |
| 29 | +import java.time.ZonedDateTime; |
30 | 30 | import java.time.format.DateTimeFormatter; |
31 | 31 | import java.util.Arrays; |
32 | 32 | import java.util.stream.Collectors; |
@@ -67,10 +67,6 @@ public class ErrorActivity extends AppCompatActivity { |
67 | 67 | public static final String ERROR_GITHUB_ISSUE_URL = |
68 | 68 | "https://github.com/TeamNewPipe/NewPipe/issues"; |
69 | 69 |
|
70 | | - public static final DateTimeFormatter CURRENT_TIMESTAMP_FORMATTER = |
71 | | - DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"); |
72 | | - |
73 | | - |
74 | 70 | private ErrorInfo errorInfo; |
75 | 71 | private String currentTimeStamp; |
76 | 72 |
|
@@ -107,7 +103,9 @@ protected void onCreate(final Bundle savedInstanceState) { |
107 | 103 |
|
108 | 104 | // important add guru meditation |
109 | 105 | addGuruMeditation(); |
110 | | - currentTimeStamp = CURRENT_TIMESTAMP_FORMATTER.format(LocalDateTime.now()); |
| 106 | + // print current time, as zoned ISO8601 timestamp |
| 107 | + final ZonedDateTime now = ZonedDateTime.now(); |
| 108 | + currentTimeStamp = now.format(DateTimeFormatter.ISO_OFFSET_DATE_TIME); |
111 | 109 |
|
112 | 110 | activityErrorBinding.errorReportEmailButton.setOnClickListener(v -> |
113 | 111 | openPrivacyPolicyDialog(this, "EMAIL")); |
@@ -250,6 +248,9 @@ private String buildMarkdown() { |
250 | 248 | .append("\n* __Content Language:__ ").append(getContentLanguageString()) |
251 | 249 | .append("\n* __App Language:__ ").append(getAppLanguage()) |
252 | 250 | .append("\n* __Service:__ ").append(errorInfo.getServiceName()) |
| 251 | + .append("\n* __Timestamp:__ ").append(currentTimeStamp) |
| 252 | + .append("\n* __Package:__ ").append(getPackageName()) |
| 253 | + .append("\n* __Service:__ ").append(errorInfo.getServiceName()) |
253 | 254 | .append("\n* __Version:__ ").append(BuildConfig.VERSION_NAME) |
254 | 255 | .append("\n* __OS:__ ").append(getOsString()).append("\n"); |
255 | 256 |
|
|
0 commit comments