Desktop: Time is incorrect in OSX High Sierra

Created on 15 Jan 2018  路  28Comments  路  Source: mattermost/desktop

I confirm (by marking "x" in the [ ] below: [x]):


https://mattermost.atlassian.net/browse/MM-14168

Summary

The time of the desktop app in mattermost is incorrect in High Sierra. This may be related to daylight savings time.

The time is correct in the web browser, and was correct before upgrading from El Capitan.

Steps to reproduce

Operating System: OS X High Sierra: 10.13.2 (17C88)
Mattermost Desktop App version: Version 3.7.1

  • Set your system timezone to a city that is currently experiencing daylight savings time, such as Melbourne - Australia
  • Write a message to someone

Expected behavior

The time displays the correct time.

Observed behavior

The time is one hour out:

time_test

Possible fixes

No idea!

Electron MacOS TypBug

All 28 comments

Thanks @cetra3! Does this reproduce on a browser, say Chrome?

Nevermind, you had already answered this.

@yuya-oc Would you have any thoughts on this issue?

Not reproduced for me probably because my Mac uses Sierra.

The link and the tooltip are rendered by webapp.
https://github.com/mattermost/mattermost-webapp/blob/080a80b265db029b060ae11ace8d9ddbb206b843/components/post_view/post_time.jsx#L64-L76

So I think that title={date} and date.toLocaleString() are different in the combination of High Sierra and Electron. I feel title should also uses date.toLocaleString() for now.

@cetra3 In your screenshot, which time is correct, the link or the tooltip?

The tooltip has the correct time

Thanks! Assuming that, date.toLocaleString() shows incorrect time due to some reason.

@yuya-oc, Yep, appears to be that function is incorrect in Electron. Do you want me to raise an issue with them?

Edit: I've managed to reproduce it with the quick start, so I've gone ahead and raised an issue.

My team is facing the same issue. The error doesn't happen with Mattermost using Chrome or other browser to access the chat, but occurs when using macOS High Sierra app.

Following you can see a picture showing the problem: https://www.dropbox.com/s/xkh7pd30qox7wtx/Screenshot%202018-01-26%2014.19.27.png?dl=0

On the left you can see our macOS High Sierra desktop app, on the right you can see a Chrome browser with Mattermost chat opened. We're based on Brazil and currently we are on daylight saving time.

@yuya-oc If I understand correctly, looks like the issue is resolved once Electron has upgraded to Chromium 63

In that case, it'll be resolved when we officially update to Chromium 63; please see https://github.com/electron/electron/projects/7 for progress! I'm going to go ahead and close this.

https://github.com/electron/electron/issues/11670#issuecomment-360014658

If that's the case, we may have to wait until Electron v2.0 is released https://github.com/electron/electron/pull/11459#issuecomment-352783190

@jasonblais I鈥檓 not sure whether it will be Electron v2 though, I think so, too. We need upstream bug fixes.

+1

I had the same issue on both desktop and mobile, it just have been fixed yesterday in Android: https://github.com/mattermost/mattermost-mobile/issues/1935

Please take a look for a fix for desktop too!

@yuya-oc Do you know if upgrading to Electron v2 helped resolve the issue?

Finally Electron v2 used Chrome 61, so sadly the issue would not be resolved. Electron v3 beta, Chrome 66 would help.

@jasonblais @yuya-oc As you can see from the following screenshot, hovering over the text _6:15 PM_ shows the correct time _5:15 PM_ === _17:15_! So it's just adding an hour somehow before displaying the text.

s

Please check the fix for mobile version, maybe it's the same issue: https://github.com/mattermost/mattermost-mobile/pull/1982

The way to display the time is different from mobile apps. Sadly desktop app can't do anything for this other than upgrading Electron because the UI is actually webapp as well as web browsers.

So possibly webapp might be able to solve the problem by modifying the tooltip.

@yuya-oc by the way tooltip is the correct time, not the opposite.

@abdelrahmanrifai Ah, that's my mistake. However anyway the desktop app can't. In the first time, we found a bug in JavaScript API, date.toLocaleString(). It's a part of webapp, so the desktop app can't touch. https://github.com/mattermost/desktop/issues/679#issuecomment-358642652

To solve this, webapp would need to calculate local time by manually considering it's in DST or not.

Hello,
Should I open an issue for Windows and Linux version?
Because we have same issue at Windows and Linux desktop version 4.1.2. At Mattermost web, time is correct. We are using Mattermost server version 5.1.1 and date time in OS is ok.

Hi all, do you have the experimental timezone setting enabled on your server? https://docs.mattermost.com/administration/config-settings.html#timezone

@amyblais I don't want everyone having to manually override their timezone settings, as we do travel in different timezones on occasion.

Is there any plans to update to the latest version of electron?

Also seeing this same issue on OSX Mojave, but OSX Sierra seems to be displaying correctly.

Hi there, the latest build which uses Electron v4 (Chrome 69) can be found on the following link. Does this help?

https://circleci.com/gh/mattermost/desktop/1857#artifacts
-> https://1857-43964563-gh.circle-artifacts.com/0/packages/mattermost-desktop-4.3.0-develop-mac.zip

It works on Mojave! 馃帀

@thejustinporter Does the aforementioned test build with the latest version of electron works on macOS Sierra as well? Does this test build fixes your completely problem?

@wget This is working on Sierra as well (but just to be clear the times were already correct on Sierra before - so no change here).

@thedingwing Sure, this was just to make it clear.
Since we will be cutting 4.3.0 in 15 days, and it appears this build will be solving your issue, I'm in favor of closing this issue. If you encounter an issue again after 4.3 has been cut and you upgraded to it, feel free to repost here and we will reopen the issue :)

Seeing a weird issue on Windows desktop app which is similar.
Sometimes times of messages changes to display in GMT, even tho timezone under Account Settings are auto, and detected as Stockholm, restarting the clients, times goes back to being correctly displayed, and then a few days later, shown as GMT again. This is with client version 4.1.2

The most confusing thing here is the "random" change to different time display.

Was this page helpful?
0 / 5 - 0 ratings