acdh-oeaw / dhcr-main

Digital Humanities Course Registry Application
https://dhcr.clarin-dariah.eu/
Apache License 2.0
4 stars 0 forks source link

Course start date is shown one day earlier in public area as entered in login area #113

Open PixlTracer opened 1 week ago

PixlTracer commented 1 week ago

Issue reported by @LauraEst:

I’ve added a couple of programs to the DH Course Registry [...].

Even though I’ve entered the dates correctly:

Screenshot_Dates_Backend

You can see that the calendar has the dates all one day earlier than the ones I’ve input:

Screenshot_Dates_Frontend

This has happened for all three that I entered. Should I leave it as is? https://dhcr.clarin-dariah.eu/courses/view/848 https://dhcr.clarin-dariah.eu/courses/view/850 https://dhcr.clarin-dariah.eu/courses/view/849

Comment @PixlTracer: my guess would be that this issue occurs because @LauraEst is located in a different time zone (ADT vs. CET), but I could be wrong... @patrickakk Perhaps this is related to Laura's time zone (Antigonish, Canada, Nova Scotia), could this be amended if she would simply set the start date to one day later than indicated?

patrickakk commented 1 day ago

@LauraEst @PixlTracer

Thanks for the report.

For now, I can give the following update: I've checked what was stored in the database. The dates are stored correctly, exactly as shown on the first screenshot from the login area:

2024-12-01;2025-01-15;2025-04-01

The second screenshot shows the public area, at a course detail page. At this point the data is processed by JavaScript to show it to the user. This is where it seems to go wrong. As @PixlTracer also suggested, this might have to do with a different timezone. This probably should not happen. It would be nice if the application behaves the same in other time zones than GMT +1 ?

That needs some further investigation.

patrickakk commented 23 hours ago

@LauraEst @PixlTracer A possible fix has been implemented. I'll keep you updated when it's available in test, so we could test it in Laura's timezone.

patrickakk commented 23 hours ago

Note: synced prod and test DB now.

LauraEst commented 14 hours ago

update: this seems to be browser specific. (I deleted cookies to test to make sure that my history wasn't affecting anything; the only browser I used in the past to access the site was Chrome.)

Tor Browser: Correct Dates

Screenshot 2024-11-04 at 3 13 19 PM

Chrome Browser: Incorrect Dates

Screenshot 2024-11-04 at 3 14 14 PM

Safari Browser: Incorrect Dates

Screenshot 2024-11-04 at 3 14 49 PM

URL: https://dhcr.clarin-dariah.eu/courses/view/848