[SERVER-4587] Be consistent with time zones Created: 30/Dec/11  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Logging, Usability
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Backlog - Security Team
Resolution: Unresolved Votes: 1
Labels: move-sec
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-9216 Handle mongos' with different timezon... Closed
Related
related to SERVER-4963 Time zone ambiguity in balancer activ... Closed
is related to SERVER-25495 use local times in repl log messages Closed
Assigned Teams:
Server Security
Participants:

 Description   

In some places we use local timezone (eg: logs, balancer start/stop windows), and in others we use GMT (eg: profiler). We should pick one and use it consistently for everything so there's never any confusion what time zone is being used.



 Comments   
Comment by Linda Qin [ 08/Aug/16 ]

In 3.2.8, the following debug msg is saved in UTC. It would be nice to save it in local timezone.

2016-08-06T11:35:38.560-0400 D REPL     [ReplicationExecutor] Scheduling heartbeat to XXXXX:27017 at 2016-08-06T15:35:40.560Z

Some other msgs are already saved in local timezone:

2016-08-06T07:34:56.809-0400 D REPL     [ReplicationExecutor] scheduling next check at 2016-08-06T07:35:06.809-0400

Comment by Eliot Horowitz (Inactive) [ 31/Dec/11 ]

Anything stored in BSON is GMT.
For things displayed in logs, etc... it should be local.
So for logRotate - that should be local.

Comment by Spencer Brody (Inactive) [ 30/Dec/11 ]

The logRotate command creates log files with the time the command was run in the filename. That time is in UTC.

Comment by Spencer Brody (Inactive) [ 30/Dec/11 ]

Not sure, the profiler was just the first place I noticed it. I just think its weird that you can't directly correlate profiler entries with log entries without doing a time zone conversion.

Comment by Scott Hernandez (Inactive) [ 30/Dec/11 ]

The profiler stores a Date field which is defined as UTC; we should not change that.

Is there any place, aside from places where the data types which defines the tz as UTC, that we don't use the local tz?

Generated at Thu Feb 08 03:06:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.