Matthew Finkel pushed to branch tor-browser-81.1.1-10.0-1 at The Tor Project / Applications / fenix
Commits:
-
f18271e0
by Georg Koppen at 2020-10-01T17:46:09+00:00
-
9dfb59c8
by Matthew Finkel at 2020-10-01T18:07:25+00:00
1 changed file:
Changes:
... | ... | @@ -38,7 +38,14 @@ object Config { |
38 | 38 |
|
39 | 39 |
@JvmStatic
|
40 | 40 |
fun generateBuildDate(): String {
|
41 |
- val dateTime = LocalDateTime.now()
|
|
41 |
+ val dateTime = if (System.getenv("MOZ_BUILD_DATE") != null) {
|
|
42 |
+ // Converting our MOZ_BUILD_DATE to LocalDateTime
|
|
43 |
+ val format = SimpleDateFormat("YYYYMMDDHHMMSS", Locale.US)
|
|
44 |
+ val date = format.parse(System.getenv("MOZ_BUILD_DATE"))
|
|
45 |
+ java.sql.Timestamp(date.getTime()).toLocalDateTime()
|
|
46 |
+ } else {
|
|
47 |
+ LocalDateTime.now()
|
|
48 |
+ }
|
|
42 | 49 |
val timeFormatter = DateTimeFormatter.ofPattern("h:mm a")
|
43 | 50 |
|
44 | 51 |
return "${dateTime.dayOfWeek.toString().toLowerCase().capitalize()} ${dateTime.monthValue}/${dateTime.dayOfMonth} @ ${timeFormatter.format(dateTime)}"
|