Merge "Force set timezone to UTC in logd."
This commit is contained in:
commit
0de940c26d
1 changed files with 5 additions and 0 deletions
|
|
@ -407,6 +407,11 @@ static int issueReinit() {
|
||||||
// logging plugins like auditd and restart control. Additional
|
// logging plugins like auditd and restart control. Additional
|
||||||
// transitory per-client threads are created for each reader.
|
// transitory per-client threads are created for each reader.
|
||||||
int main(int argc, char* argv[]) {
|
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.
|
// issue reinit command. KISS argument parsing.
|
||||||
if ((argc > 1) && argv[1] && !strcmp(argv[1], "--reinit")) {
|
if ((argc > 1) && argv[1] && !strcmp(argv[1], "--reinit")) {
|
||||||
return issueReinit();
|
return issueReinit();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue