Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8becca0b authored by Hidehiko Abe's avatar Hidehiko Abe Committed by android-build-merger
Browse files

Merge "Force set timezone to UTC in logd." am: 0de940c2

am: 5cadd139

Change-Id: I3b3f9af4e461fab3cde1dca2d4a7785a5ce84089
parents 45d079ac 5cadd139
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -407,6 +407,11 @@ static int issueReinit() {
// logging plugins like auditd and restart control. Additional
// transitory per-client threads are created for each reader.
int main(int argc, char* argv[]) {
    // logd is written under the assumption that the timezone is UTC.
    // If TZ is not set, persist.sys.timezone is looked up in some time utility
    // libc functions, including mktime. It confuses the logd time handling,
    // so here explicitly set TZ to UTC, which overrides the property.
    setenv("TZ", "UTC", 1);
    // issue reinit command. KISS argument parsing.
    if ((argc > 1) && argv[1] && !strcmp(argv[1], "--reinit")) {
        return issueReinit();