summaryrefslogtreecommitdiffstats
path: root/twrp-functions.cpp
diff options
context:
space:
mode:
authorPhoenix591 <kcelbert@gmail.com>2018-02-03 08:23:54 +0100
committerEthan Yonker <dees_troy@teamw.in>2018-05-25 18:15:29 +0200
commite444d115526088493704e957d033e0e9f7c2918b (patch)
tree7bc7bd1a91de05a2588523cdc56452207ce346c6 /twrp-functions.cpp
parentTWRP: Move the valid current time up to trigger fix on more devices. (diff)
downloadandroid_bootable_recovery-e444d115526088493704e957d033e0e9f7c2918b.tar
android_bootable_recovery-e444d115526088493704e957d033e0e9f7c2918b.tar.gz
android_bootable_recovery-e444d115526088493704e957d033e0e9f7c2918b.tar.bz2
android_bootable_recovery-e444d115526088493704e957d033e0e9f7c2918b.tar.lz
android_bootable_recovery-e444d115526088493704e957d033e0e9f7c2918b.tar.xz
android_bootable_recovery-e444d115526088493704e957d033e0e9f7c2918b.tar.zst
android_bootable_recovery-e444d115526088493704e957d033e0e9f7c2918b.zip
Diffstat (limited to 'twrp-functions.cpp')
-rw-r--r--twrp-functions.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index f82de6140..11e745b38 100644
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -996,6 +996,10 @@ void TWFunc::Fixup_Time_On_Boot(const string& time_paths /* = "" */)
gettimeofday(&tv, NULL);
tv.tv_sec += offset/1000;
+#ifdef TW_CLOCK_OFFSET
+// Some devices are even quirkier and have ats files that are offset from the actual time
+ tv.tv_sec = tv.tv_sec + TW_CLOCK_OFFSET;
+#endif
tv.tv_usec += (offset%1000)*1000;
while (tv.tv_usec >= 1000000)