From 67351dca6670d3566405cb8e610f73a1550d282b Mon Sep 17 00:00:00 2001 From: Vojtech Bocek Date: Thu, 3 Jul 2014 15:22:41 +0200 Subject: Check the crash counter instead of date in TWFunc::Fixup_Time_On_Boot() * Some devices (Sony) have RTC counting up from year 2009, Change-Id: I2cf1928e1b05c7e8b184963f8130582e0319ddc4 Signed-off-by: Vojtech Bocek --- twrp-functions.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'twrp-functions.cpp') diff --git a/twrp-functions.cpp b/twrp-functions.cpp index db98a363a..4306c4520 100644 --- a/twrp-functions.cpp +++ b/twrp-functions.cpp @@ -1094,16 +1094,6 @@ void TWFunc::Fixup_Time_On_Boot() struct dirent *dt; std::string ats_path; - - // Don't fix the time of it already is over year 2000, it is likely already okay, either - // because the RTC is fine or because the recovery already set it and then crashed - gettimeofday(&tv, NULL); - if(tv.tv_sec > 946684800) // timestamp of 2000-01-01 00:00:00 - { - LOGINFO("TWFunc::Fixup_Time: not fixing time, it seems to be already okay (after year 2000).\n"); - return; - } - if(!PartitionManager.Mount_By_Path("/data", false)) return; -- cgit v1.2.3