]> git.seodisparate.com - AnotherAURHelper/commitdiff
Fix "datetime_in_local_time" usage
authorStephen Seo <seo.disparate@gmail.com>
Mon, 11 Sep 2023 01:29:10 +0000 (10:29 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Mon, 11 Sep 2023 01:29:10 +0000 (10:29 +0900)
example_config.toml
update.py

index 08bf3133ebf2f62d2263dff7169e4c77c4835286..b82878a300d593c887c754f7f48e0bbcead2dfe9 100644 (file)
@@ -20,6 +20,8 @@ is_log_timed = true
 log_limit = 1073741824
 # If true, then make the build fail if the limit is reached
 error_on_limit = false
+# If true, timestamps are in localtime. If false, timestamps are UTC.
+datetime_in_local_time = true
 ########## END OF MANDATORY VARIABLES
 
 # Each [[entry]] needs a "name".
index c0a3114790d5543873014926e0cc4c515768ac50..08666adf2f2c2e6aa40fab15fda029f746fcd76e 100755 (executable)
--- a/update.py
+++ b/update.py
@@ -1833,6 +1833,14 @@ if __name__ == "__main__":
         other_state["gpg_home"] = d["gpg_dir"]
         other_state["logs_dir"] = d["logs_dir"]
         other_state["clones_dir"] = d["clones_dir"]
+        if (
+            "datetime_in_local_time" in d
+            and type(d["datetime_in_local_time"]) is bool
+            and d["datetime_in_local_time"]
+        ):
+            other_state["datetime_in_local_time"] = True
+        else:
+            other_state["datetime_in_local_time"] = False
         if other_state["logs_dir"] is not None:
             GLOBAL_LOG_FILE = other_state["logs_dir"] + "/update.py_logs"
             log_print(
@@ -1902,14 +1910,6 @@ if __name__ == "__main__":
                 other_state["error_on_limit"]
             )
         )
-        if (
-            "datetime_in_local_time" in d
-            and type(d["datetime_in_local_time"]) is bool
-            and d["datetime_in_local_time"]
-        ):
-            other_state["datetime_in_local_time"] = True
-        else:
-            other_state["datetime_in_local_time"] = False
     else:
         log_print(
             'ERROR: At least "--config" or "--pkg" must be specified',