Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message timestamps shown in wrong timezone #43

Closed
ncraike opened this issue Jun 4, 2019 · 18 comments
Closed

Message timestamps shown in wrong timezone #43

ncraike opened this issue Jun 4, 2019 · 18 comments

Comments

@ncraike
Copy link

ncraike commented Jun 4, 2019

As of the last few days, when I run the Flatpak-installed Slack app, my messages are timestamped with the wrong timezone.

The timestamps seem to be UTC. My actual timezone is Brisbane/Australia (UTC+10). So for example, a message received at 1:23pm local time will be shown timestamped 03:23 instead of 13:23.

This doesn't happen if I login to the same Slack workspace through a web browser (e.g. Firefox). In Firefox the correct timestamps (local time) are shown.

I'm running Fedora release 30. I upgraded from Fedora release 29 a few weeks ago. This issue is more recent than that (the last few days).

$ timedatectl
              Local time: Tue 2019-06-04 13:26:01 AEST
          Universal time: Tue 2019-06-04 03:26:01 UTC
                RTC time: Tue 2019-06-04 13:26:01
               Time zone: Australia/Brisbane (AEST, +1000)
$ flatpak run com.slack.Slack
Gtk-Message: 13:20:05.439: Failed to load module "canberra-gtk-module"
Gtk-Message: 13:20:05.439: Failed to load module "pk-gtk-module"
Gtk-Message: 13:20:05.439: Failed to load module "canberra-gtk-module"
Gtk-Message: 13:20:05.439: Failed to load module "pk-gtk-module"
Creating Slack Application
@mvermaes
Copy link

mvermaes commented Jun 4, 2019

I see the same behaviour here, but I'm still on Fedora 28. It wasn't occurring until I updated Slack flatpak to 3.4.2 this morning. Pretty sure I was on 3.4.0 previously.

@FakeShemp
Copy link
Contributor

FakeShemp commented Jun 4, 2019

Timestamps locale work here on Manjaro, so I don't think there's anything I've broken in the manifest itself.

If you could try to run

flatpak update --commit=014b6644d7f75120a47e7edce86a875c81b4e27a1844bfcfafcfe6280bdfafd6 com.slack.Slack

to install the version with just an update to 3.4.2. If that still doesn't work, then it's probably an issue with Slack itself.

@mvermaes
Copy link

mvermaes commented Jun 4, 2019

Yep, same problem after using the commit you mentioned. Going one further back to 3.4.0 (810ae703) shows the correct timestamp again.

@FakeShemp
Copy link
Contributor

I'm leaning towards this being a Slack or Electron issue. If you have the option to try out the official installs, that would narrow it down a bit.

@mvermaes
Copy link

mvermaes commented Jun 4, 2019

slack-3.4.2-0.1.fc21.x86_64.rpm is working OK for me (edit: with the correct timestamp shown).

@EspadaV8
Copy link

EspadaV8 commented Jun 4, 2019

Also having the same issue in Fedora 30, also in Brisbane. Using the official RPM shows the correct timestamps for the messages. Changing the timezone settings within the app doesn't change the timestamps in the app.

@trnubo
Copy link

trnubo commented Jun 5, 2019

Also having this issue on Fedora 30 and the latest version from Flathub. Only after going back to 3.4.0 where the times correct.

flatpak update --commit 810ae703189dd439c5a7059accf33af495d415e2d46545a3bfcccf445ab7c092 com.slack.Slack

@FakeShemp
Copy link
Contributor

I really have no idea why it happens. Any help is appreciated.

Comparing the binaries between the RPM and the Deb packages, they differ for some reason. I'm wondering if there's changes specifically for Fedora. I'll look into it.

@mvermaes
Copy link

mvermaes commented Jun 6, 2019

This also works around the problem in my case:

flatpak run --env=TZ=Australia/Perth com.slack.Slack

Found from https://github.com/flathub/com.valvesoftware.Steam/wiki/Frequently-asked-questions#im-having-incorrect-timezone-in-steam

Also, in case it's relevant, I have the Slack flatpak installed as a user (--user) rather than system-wide.

(Edit: I can't reproduce this any more):
Checking the timezone info in the flatpak, 3.4.0 has /etc/localtime set to UTC:
$ flatpak run --command=bash com.slack.Slack
bash-4.4$ zdump /run/host/monitor/localtime
/run/host/monitor/timezone Thu Jun 6 05:00:03 2019
whereas 3.4.2 has it set to AWST (the local timezone):
$ flatpak run --command=bash com.slack.Slack
bash-4.4$ zdump /run/host/monitor/localtime
/run/host/monitor/localtime Thu Jun 6 13:05:00 2019 AWST

@josmardias
Copy link

Maybe related to
flatpak/flatpak#2190 ?

@FakeShemp
Copy link
Contributor

I went back to this today by installing Fedora 30 and trying it out. I was not able to reproduce. However, I did add a note about it and how to fix it in the readme here on Github, in case others find themselves in the same situation.

@NamelessVoice
Copy link

NamelessVoice commented Jul 26, 2019

I've also been seeing this recently, though it used to work correctly in the past.
In my case it thinks I'm in India time instead of GMT.

Explicitly passing in the timezone through the --env flag works around the problem.

Version 4.0.0 of the Flatpak on Linux Mint.
com.slack.Slack/x86_64/stable system, current

@dolfandringa
Copy link

The above workaround by mvermaes works for me too. But without it I have had the issue from (I think) Fedora 28 up to now in Fedora 30. I am running with gnome3 on kernel 5.2.9-200 and the flatpak install 4.0.1. The timestamps are off by 3 hours for me without the workaround
This is my timezone info (which is correct).

$ timedatectl
               Local time: Mon 2019-08-26 08:44:22 PST
           Universal time: Mon 2019-08-26 00:44:22 UTC
                 RTC time: Mon 2019-08-26 08:44:21
                Time zone: Asia/Manila (PST, +0800)
System clock synchronized: no
              NTP service: inactive
          RTC in local TZ: yes

I am running kernel 5.2.9-200 right now (but again, this has been bugging me since I think F28) and this is my Slack installation:

          ID: com.slack.Slack
         Ref: app/com.slack.Slack/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 4.0.1
     License: LicenseRef-proprietary
      Origin: flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 2.8 MB
     Runtime: org.freedesktop.Platform/x86_64/18.08
         Sdk: org.freedesktop.Sdk/x86_64/18.08

      Commit: a10574ca28995af9d14a2510e369e458d47b0b35b78e80b7fae29995b607bd16
      Parent: dd864e4fc3d1eab1c29930e1f913bbc83c88cfdaa805a09e088b495563977703
     Subject: Update to 4.0.1 (bc4873db)
        Date: 2019-07-31 11:43:20 +0000

@shnplr
Copy link

shnplr commented Sep 10, 2019

worked for me
$ flatpak override --user --env=TZ=Australia/Sydney com.slack.Slack

@bauermann
Copy link

I have found one clue. If I change the /etc/localtime symlink to ../usr/share/zoneinfo/America/Sao_Paulo, then Slack shows the correct timestamps.¹

Original value of the /etc/localtime symlink (and also the /etc/timezone one):

$ ls -l /etc/localtime /etc/timezone
lrwxrwxrwx 1 bauermann bauermann 27 Dec 17 11:34 /etc/localtime -> /run/host/monitor/localtime
lrwxrwxrwx 1 bauermann bauermann 26 Dec 17 11:34 /etc/timezone -> /run/host/monitor/timezone
$ cat /etc/timezone
America/Sao_Paulo

So my suspicion is that something inside Slack doesn't know how to cope with the /etc/localtime symlink not being of the form some/path/America/Sao_Paulo

I'm also using Fedora 30. Flatpak is version 1.4.3.
The TZ override works around the problem for me as well.

--
¹ Well, it would if the runtime had up-to-date zoneinfo files. But that's another problem.

@mvermaes
Copy link

mvermaes commented Feb 12, 2020

I've been testing each new release as they came out and they all had the same problem until the recent update to 4.3.2.

I no longer need to use the --env=TZ=... workaround with this version. I'm on Fedora 30 now as well, but the rest of the system is otherwise unchanged.

@mopsfelder
Copy link

For me, this issue no longer exists with slack-4.3.2-0.1.fc21.x86_64 on Fedora 31, i.e.: timestamps of the messages are displayed correctly without any timezone work-around in place.

Thank you!

@barthalion
Copy link
Member

@mopsfelder Well, we're not Fedora, but you're welcome!

Yes, 4.3.2 landed today to stable branch. Closing if you say it's fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests