Commit a826b2cd authored by Georg Koppen's avatar Georg Koppen Committed by Matthew Finkel
Browse files

Bug 40067: Fix reproducibility issue in classes2.dex

We make sure our MOZ_BUILD_DATE gets used as a source for showing date
related information on the Fenix about page.
parent 8a3fa281
......@@ -38,7 +38,14 @@ object Config {
fun generateBuildDate(): String {
val dateTime =
val dateTime = if (System.getenv("MOZ_BUILD_DATE") != null) {
// Converting our MOZ_BUILD_DATE to LocalDateTime
val format = SimpleDateFormat("yyyyMMddHHmmss", Locale.US)
val date = format.parse(System.getenv("MOZ_BUILD_DATE"))
} else {
val timeFormatter = DateTimeFormatter.ofPattern("h:mm a")
return "${dateTime.dayOfWeek.toString().toLowerCase().capitalize()} ${dateTime.monthValue}/${dateTime.dayOfMonth} @ ${timeFormatter.format(dateTime)}"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment