void-packages/srcpkgs/ghidra/patches/honor_source_date_epoch.patch

30 lines
1.2 KiB
Diff

--- a/ghidra_build/build.gradle 2021-09-28 20:47:24.000000000 +0200
+++ - 2021-10-21 16:31:33.820391721 +0200
@@ -246,7 +246,7 @@
*********************************************************************************/
def getCurrentDate() {
- def date = new Date()
+ def date = System.getenv("SOURCE_DATE_EPOCH") == null ? new Date() : new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))
def formattedDate = date.format('yyyyMMdd')
return formattedDate
}
@@ -256,7 +256,7 @@
*********************************************************************************/
def getCurrentDateTime() {
- def date = new Date()
+ def date = System.getenv("SOURCE_DATE_EPOCH") == null ? new Date() : new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))
def formattedDate = date.format('yyyyMMdd-HHmm')
return formattedDate
}
@@ -266,7 +266,7 @@
*********************************************************************************/
def getCurrentDateTimeLong() {
- def date = new Date()
+ def date = System.getenv("SOURCE_DATE_EPOCH") == null ? new Date() : new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))
def formattedDate = date.format('yyyy-MMM-dd HHmm z')
return formattedDate
}