Casvt / MIND

A simple self hosted reminder application that can send push notifications to your device. Set the reminder and forget about it!
https://casvt.github.io/MIND/
GNU General Public License v3.0
209 stars 10 forks source link

TZ issues #26

Closed tiritibambix closed 1 year ago

tiritibambix commented 1 year ago

So I forgot about this for a moment and went on with my life, when suddenly, I got a notification. It was my reminder, coming one hour late. Exactly one hour late.

I was tinkering things from my wife's computer, so I tried on my phone.

So, from my phone, everything works exactly as intended ! It displays correctly in the app and sends the notification at the correct time. But checking it out on my wife's computer, reminder time displays 1 hour early.

Let's say I create a reminder at 16h30 from my phone, it displays 16h30 on my phone, but 15h30 on my wife's computer. If I set a reminder at 16h30 from my wife's computer, it will display the correct time but will send the notification at 17h30.

My phone and my wife's computer use the same time settings. My host / server uses this :

$ timedatectl
               Local time: Sat 2023-01-21 16:31:27 CET
           Universal time: Sat 2023-01-21 15:31:27 UTC
                 RTC time: Sat 2023-01-21 15:31:28
                Time zone: Europe/Paris (CET, +0100)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

Not sure what to think of this.

tiritibambix commented 1 year ago

@ItsNoted

The time is defined by the TZ environment variable. make sure to put TZ=Europe/Paris and try again. If that does not work please check the time and date on the host using date and see if it matches. If not run the following command timedatectl set-timezone Europe/Paris Use sudo if required.

I did use the good variable

        environment:
            - TZ=Europe/Paris

I did check time and date on the host (see above) and it looks correct...

Casvt commented 1 year ago

To make it clear:

  1. There are three devices here: the server, the computer and the phone
  2. They all have the same time zone set (Europe/Paris)
  3. When you add a reminder on the phone for 16:30, it shows 16:30 in the library view on the phone, but 15:30 in the library view on the computer
  4. When you add a reminder from the computer for 16:30, it shows 16:30 in the library view on the computer, but you receive the notification at 17:30

Please correct any of these statements.

Regarding point 3: when do you get the notification (15:30, 16:30 or 17:30)? Regarding point 4: what time do you see on the phone in this situation?

tiritibambix commented 1 year ago

1 There are three devices here: the server, the computer and the phone

Correct

2 They all have the same time zone set (Europe/Paris)

Correct

3 When you add a reminder on the phone for 16:30, it shows 16:30 in the library view on the phone, but 15:30 in the library view on the computer

Correct

4 When you add a reminder from the computer for 16:30, it shows 16:30 in the library view on the computer, but you receive the notification at 17:30

Correct !

Regarding point 3: when do you get the notification (15:30, 16:30 or 17:30)?

When I add a reminder on the phone for 16:30, I get the notification at 16:30

Regarding point 4: what time do you see on the phone in this situation?

When I add a reminder from the computer for 16:30, it shows 17:30 in the library view on the phone.

Casvt commented 1 year ago

Phone ADD 16:30 Phone VIEW 16:30 Computer VIEW 15:30 Sent: 16:30

Computer ADD 16:30 Phone VIEW 17:30 Computer VIEW 16:30 Sent: 17:30

So the computer is one hour behind. You say that all devices have the same timezone set. Maybe the browser on the computer has a different time zone set?

tiritibambix commented 1 year ago

Thanks for looking into this.

You got a point here. It is browser related indeed ! I tried with Vivaldi (chromium based) and it works as intended.

I use Librewolf on a daily basis. I checked the options, and the only entry related to hour / date is Use your operating system settings for “Français (France)” to format dates, times, numbers, and measurements.

It was unticked. I tried activating it, but the problem remains the same.

I guess I should address this to Firefox / Librewolf's devs now ?

Casvt commented 1 year ago

Contacting support of Firefox / Librewolf might be smart. Doesn't have to be a bug but just getting help from their side might be handy.

tiritibambix commented 1 year ago

Not exactly what I was hoping for 😅

Casvt commented 1 year ago

Oh that sucks. But we can conclude that it's not a problem with Noted and thus, I'm going to close the issue.

tiritibambix commented 1 year ago

Thanks for your help :)