diff --git a/example_config.toml b/example_config.toml index 08bf313..b82878a 100644 --- a/example_config.toml +++ b/example_config.toml @@ -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". diff --git a/update.py b/update.py index c0a3114..08666ad 100755 --- 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',