[COMPASS-115] As a developer I want to show dates in server time and not local (laptop) time Created: 08/Oct/16  Updated: 10/Jan/24  Resolved: 22/Aug/18

Status: Closed
Project: Compass
Component/s: Real Time Server Stats
Affects Version/s: None
Fix Version/s: 1.16.0

Type: Story Priority: Major - P3
Reporter: Thomas Rueckstiess Assignee: Durran Jordan
Resolution: Done Votes: 6
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screenshot_EST.PNG     PNG File Screenshot_UTC.PNG    
Issue Links:
Related
is related to COMPASS-2831 As a DBA or developer, I want the opt... Closed
is related to COMPASS-2647 Compass displays date time with confi... Open
Epic Link: COMPASS-2280
Story Points: 5
Sprint: Compass Sprint Hotmail, Compass Sprint IRC, Iteration Halloumi

 Description   
Story

As a developer, I want Compass to show date values in server time and not converted to the local (laptop) time so that I confirm that my application is saving dates correctly.

User anecdote

More details:
With the current Compass implementation, I thought my App inserts dates with an offset of +1 day and I spent a lot of time trouble-shooting until I used the mongo shell and realized the dates are correct but Compass shows it converted to local time.

Product Acceptance Criteria
  • Have a menu option(s) to Show Dates as server time or local time
  • Default to server time


 Comments   
Comment by Massimiliano Marcon [ 22/Feb/19 ]

doug@not2scale.com can you post an example document and a screenshot of how they are shown in Compass? Are your fields containing dates nested fields? We have an open bug related to that: COMPASS-3372.

Comment by Douglas Branton [ 20/Feb/19 ]

I just downloaded 1.16.4 and the issue is not resolved.  When I change my system timezone, the dates within Mongo Compass change to the system selected Timezone.  I store all dates in Mongo as UTC, and incorrectly expected Compass was showing UTC.

Comment by Wesley Griffing [ 13/Nov/18 ]

I just updated to Compass Community v1.16.0, but I do not believe this issue is resolved.

I have attached 2 screenshots. In one screenshot, the timezone on my PC is set to UTC+0. In the other screenshot, the timezone on my PC is set to UTC-5 (EST), which actually is UTC-4 at the moment due to daylight savings.

In the database records on the left of both screenshots, the "start" and "stop" fields are both of type Date. You can see the value reported by MongoDB Compass changes with the timezone. I believe this is unexpected. Is there some config or other changes necessary in order to have the dates display as UTC?

I'm happy to see this being worked on as I spent several hours trying to debug my application yesterday. I assumed I had some error, but eventually realized my assumption that Compass would show me UTC values was a bad assumption.


Comment by Irina Shestak (Inactive) [ 23/Aug/18 ]

dejesusa@aimspecialtyhealth.com: we released 1.16.0-beta yesterday. If you like, you should be able to get it from our downloads centre

Comment by Armani DeJesus [ 21/Aug/18 ]

Excellent! Thanks Irina, when is 1.16.0 scheduled for release?

Comment by Irina Shestak (Inactive) [ 21/Aug/18 ]

We landed a fix for this in compass master, and it will be released as part of our `1.16.0` version.

Comment by Githook User [ 20/Aug/18 ]

Author:

{'name': 'Irina Shestak', 'email': 'lrlna@users.noreply.github.com', 'username': 'lrlna'}

Message: update compass-crud and -aggregations to show dates in utc

COMPASS-115: update compass-crud and -aggregations to show dates in utc
Branch: master
https://github.com/10gen/compass/commit/868e5d19bb00c07bb070c498738accd0b7ea0fb0

Comment by Armani DeJesus [ 13/Aug/18 ]

I am having the same issue with Compass, and the only work-around have is to use Robo3T or NoSQL Booster.

Comment by Peter Chang [ 05/Jul/18 ]

Spent around 8 hrs in the past week debugging the java drivers because I thought they were performing datetime transforms on my traffic.

Turns out my issue was using Compass to verify that the datetime saved.

To paraphrase, I was saving a timestamp into mongo, and verifying the data using Compass. Saving 07-01-2018T00:00:00Z to mongo and viewing the record through Compass as 06-30-2018 17:00:00.000, which left me wondering what was manipulating the data as it entered the database.

You would think the visualization tool for a database built to store UTC would display using UTC. At the very least, make the timezone applied to timestamps visible somewhere in the interface.

Comment by Asya Kamsky [ 27/Nov/17 ]

it's going to be particularly annoying now that aggregation supports adding timezone to various agg date expressions...

Comment by Lucas Hrabovsky (Inactive) [ 30/Aug/17 ]

Another case of user confusion via Twitter:

Scott Hanson‏ @papascott Aug 19
Same app, same data shows different dates on different systems! #node #mongodb #timezones

Set TZ=Europe/Berlin on production server, and note MongoDB Compass displays timestamps using client machine TZ, not UTC.

Generated at Wed Feb 07 22:24:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.