[STCOM-779] Calendar shows the wrong day of the week when client PCs timezone is ahead of UTC Created: 02/Nov/20  Updated: 15/Jun/21  Resolved: 13/Nov/20

Status: Closed
Project: stripes-components
Components: None
Affects versions: None
Fix versions: 8.0.1

Type: Bug Priority: P2
Reporter: Felix Hemme Assignee: John Coburn
Resolution: Done Votes: 0
Labels: bugfest_q3.2020, i18n
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Attachments: PNG File Screen Shot 2020-11-03 at 11.14.42.png     PNG File Screen Shot 2020-11-03 at 11.18.15.png     PNG File Screenshot 2021-06-15 at 10.12.10.png     PNG File UTC+1 Berlin.png     PNG File UTC.png     PNG File displaying_in_UTC.png     PNG File image-2021-03-11-11-36-02-727.png     PNG File image-2021-03-11-12-09-56-596.png     PNG File screenshot-1.png     PNG File tenant settings.png    
Issue links:
Relates
relates to ERM-1202 Dates are not saved as entered when t... Closed
relates to STCOM-849 Wrong day of week in day picker calen... Closed
relates to UICHKOUT-670 due date on user interface doesn't ma... Closed
relates to UINV-202 Invoice date filters are off set by t... Closed
relates to UXPROD-2767 R1 2021 | Stripes-force Tech debt Closed
Sprint: stripes-force 101, stripes-force 102
Development Team: Stripes Force
Release: Q3 2020 Bug Fix
Affected Institution:
Chalmers, GBV, University of Leipzig

 Description   

Overview:
Steps to Reproduce:

  1. Log into FOLIO bugfest https://bugfest-honeysuckle.folio.ebsco.com/ and open Agreements app
  2. Create a new Agreement
  3. Enter an agreement name and status
  4. Make sure your client PCs time zone is set to "UTC+1" or "UTC+n"
  5. In "Agreement periods", open the calendar in the field "Start date"

Expected Results:

  1. The calendar displays the correct date and day of the week.

Actual Results:

  1. The calendar displays the correct date, but the wrong day of the week.

Additional Information:

  1. When you set the PC time zone to "UTC" or "UTC-n", the calendar behaves OK.
    Maybe related (but different) issue: ERM-1202
    Interested parties:
    Khalilah Gambrell
    Owen Stephens


 Comments   
Comment by Cheryl Malmborg [ 02/Nov/20 ]

Chalmers reported a similar issue:
We had a funny issue in Chalmers Goldenrod last week, before going back to standard/winter time. The exception period was set to all day 10/31/2020 but shown in calendar as 10/30/2020.
This has now self healed, maybe due to the change to standard time on the 25th? Our time zone is Europe/Stockholm.

Comment by Khalilah Gambrell [ 02/Nov/20 ]

Cheryl Malmborg and Felix Hemme, did you also experience this issue with ui-calendar? Also is this an issue when the Time Zone setting is UTC? OR Europe/Berlin?

Comment by Felix Hemme [ 03/Nov/20 ]

did you also experience this issue with ui-calendar?

I'm not sure what <ui-calendar> is. I experienced it when using the date picker in Agreements, see screenshots.

Also is this an issue when the Time Zone setting is UTC? OR Europe/Berlin?

It occurs when the time zone is set to "Europe/Berlin" and any other time zone that is ahead of UTC. When time zone is set to UTC or UTC-, it works fine.

Comment by Owen Stephens [ 03/Nov/20 ]

This seems to occur with all calendar widgets. I've at least confirmed in Orders and ui-calendar (in the calendar widget not in the main calendar display)


I'm seeing this on Honeysuckle and Snapshot
Timezone of tenant has no effect, only timezone of local system

We'd thought that ERM-1202 Closed could be related, but Aditya matukumalli has now fixed ERM-1202 Closed and I've confirmed that on Snapshot - so it looks like the two issues are unrelated

Comment by Ann-Marie Breaux (Inactive) [ 05/Nov/20 ]

Aliaksei Chumakou Here's another example of the date/time problem similar to the filter that we discussed today.

Owen Stephens do you know if there is any Jira documenting this centrally and (hopefully) aiming to fix it centrally? Since it affects date filters all over the place, it seems better to fix it once.

Comment by Ann-Marie Breaux (Inactive) [ 05/Nov/20 ]

John Coburn I didn't realize this is the central ticket. This came up with order and invoice date filters in acquisitions today - definitely confusing, since the date and time being filtered by is not the date and time showing in the UI on the order or invoice. That's a different use case from the calendar, but (I think) related.

cc: Aliaksei Chumakou and Dennis Bridges

Comment by Ann-Marie Breaux (Inactive) [ 05/Nov/20 ]

Sorry John Coburn One more question - could this be bugfixed into Honeysuckle, or is it too risky and will need to wait for Iris?

Comment by Khalilah Gambrell [ 05/Nov/20 ]

Ann-Marie Breaux, yesterday, John and I discussed this issue and the plan is to address this issue for Honeysuckle. Can you and Dennis Bridges all related issues?

Comment by Ann-Marie Breaux (Inactive) [ 05/Nov/20 ]

Hi Khalilah Gambrell would it be as simple as figuring out where all there are date filters? Do you want separate Jiras for each one? You might want to ask on the PO channel as well. I'm guessing this may come up in the circ log and requests as well.

Comment by Aliaksei Chumakou [ 09/Nov/20 ]

Ann-Marie Breaux I'm not sure that issue with filters is related to this, we don't use Calendar in filters

Comment by Ann-Marie Breaux (Inactive) [ 09/Nov/20 ]

Hi Aliaksei Chumakou I understand. I just linked them because they all seem to have a similar underlying issue - UI based on the locale and backend results based on the UTC

Comment by Aliaksei Chumakou [ 09/Nov/20 ]

Khalilah Gambrell Maybe you know, is that intentional that in FOLIO date time values is displaying in UTC? Maybe there is a plan or tickets to display in local timezone?

Comment by Khalilah Gambrell [ 09/Nov/20 ]

Aliaksei Chumakou, the time is based on Settings. See snapshot.

Comment by Aliaksei Chumakou [ 09/Nov/20 ]

Khalilah Gambrell thanks! it works, good to know!

Comment by Dennis Bridges [ 09/Nov/20 ]

Aliaksei Chumakou so do we need stories written to make sure all our date/time fields display based on local timezone setting? Or is this already done by the component? Meaning the invoice date should display in local timezone and not always display UTC?

Comment by Aliaksei Chumakou [ 09/Nov/20 ]

Dennis Bridges User selects his timezone in settings, and he will see date time in the selected timezone. From my point of view we are good, no stories are required.

Comment by Ann-Marie Breaux (Inactive) [ 09/Nov/20 ]

Hi Aliaksei Chumakou I thought the problem was that the date filter was still using UTC, despite the locale that the tenant is using. Did I misunderstand?

Comment by Cheryl Malmborg [ 09/Nov/20 ]

The reported problem was that that the wrong day of the week is displayed in the calendar widget. The date is correct but the day of the week is wrong. November 2 was a Monday, but Monday displays as November 3.

Looking at Owen's and Felix's screen shots, their calendars list the days of the week starting with Saturday. Mine in the US defaults to starting on Sunday.

It appears that the calendar layout is determined in some way by local practice, but the dates are not adjusted accordingly.

Comment by Felix Hemme [ 10/Nov/20 ]

I reported the issue, so I try to give more details about what I think is wrong in the system:
1. Make sure your PCs time zone is set to UTC+1, e.g. Berlin time
2. Open Folio snapshot and look for an app that uses the calendar picker, e.g. Check in, Agreements, or Licenses
3. Open the calendar picker
Observations:

  • Nov 10th is a Tuesday in the real world
  • In Folio, the calendar shows that Nov 10th is a Monday
    Now set the client PCs time zone to UTC-6. Open the calender picker again.
    Observations:
  • Nov 10th still is a Tuesday in the real world
  • In Folio, the calendar shows correctly that Nov 10th is a Tuesday
    The tenant time zone has no effect. The problems occurs regardless of the selected setting.

Looking at Owen's and Felix's screen shots, their calendars list the days of the week starting with Saturday. Mine in the US defaults to starting on Sunday.

US calendars start with Sunday, German calendars start with Monday.
1. When tenant locale is set to "American English" AND tenant time zone is set to "America/New_York" AND time zone of client PC is set to "UTC-6" the Folio calendar shows Sunday as first day of the week. -> OK
2. When tenant locale is set to "American English" AND tenant time zone is set to "America/New_York" AND time zone of client PC is set to "UTC+1" the Folio calendar shows Saturday as first day of the week. -> ??? What is the expected behaviour?
3. When tenant locale is set to "American English" AND tenant time zone is set to "Europe/Berlin" AND time zone of client PC is set to "UTC+1" the Folio calendar shows Saturday as first day of the week. -> ??? What is the expected behaviour?
3. When tenant locale is set to "German (Germany)" AND tenant time zone is set to "Europe/Berlin" AND time zone of client PC is set to "UTC+1" the Folio calendar shows Sunday as first day of the week. -> NOT OKAY, should be Monday
4. When tenant locale is set to "American English" AND tenant time zone is set to "Europe/Berlin" AND time zone of client PC is set to "UTC-6" the Folio calendar shows Sunday as first day of the week. -> ??? What is the expected behaviour?

Comment by John Coburn [ 12/Nov/20 ]

PR for this submitted and merged...
Turns out the base dates we were using to build our array of localized weekday names was being localized by the browser, so this would end up displacing it a day... I switched the code to specifying this base date in UTC time, so there should be no offset and the weekdays should be accurate. It's on the way!!

Comment by Khalilah Gambrell [ 17/Nov/20 ]

Felix Hemme, can you test that this issue has been resolved on https://bugfest-honeysuckle.folio.ebsco.com?

cc: John Coburn

Comment by Felix Hemme [ 17/Nov/20 ]

Khalilah Gambrell With session locale set to Germany (German) and client PC time zone set to UTC+1, the calendar shows Monday as first day of the week and the correct date . Thanks for fixing this.

Comment by Maryam Vardeh [ 11/Mar/21 ]

We still have a similar problem. This is a screen shot from editing in User-app. As you can see it shows March 11th as a friday, when in fact it is a thursday.

Comment by Julian Ladisch [ 11/Mar/21 ]

Maryam Vardeh: This has been fixed in stripes-components version >= 8.0.1.

It works for me on https://bugfest-honeysuckle.folio.ebsco.com in the "Expiration date" in the users app.

Do you see the bug on https://bugfest-honeysuckle.folio.ebsco.com ?

https://bugfest-honeysuckle.folio.ebsco.com uses stripes-components version 8.0.2.

You can see the stripes-components version on the "settings - software versions" page: https://bugfest-honeysuckle.folio.ebsco.com/settings/about

Please post the URL of the installation where you see the bug and post the stripes-components version that it runs.

Comment by Maryam Vardeh [ 11/Mar/21 ]

Is this the URL you need, Julian Ladisch?

https://chalmers.folio.ebsco.com/users/142b1c88-ec10-48f7-9994-b7cb8e82f4a7/edit?query=vardeh&sort=name

Comment by Anya [ 08/Jun/21 ]

This is also still happening... 

Comment by Marc Johnson [ 08/Jun/21 ]

Anya

This is also still happening...

Does that mean that this should be re-opened or a new issue raised for a regression?

Comment by Khalilah Gambrell [ 08/Jun/21 ]

Anya and Marc Johnson, if this is still happening then we need to create a new story.

Comment by Anya [ 08/Jun/21 ]

I am not sure it is UI issues or a code issue...

Comment by Khalilah Gambrell [ 08/Jun/21 ]

Anya, can you create the issue and then I can determine who can triage? Feel free to create the issue in this project.

Comment by Julian Ladisch [ 14/Jun/21 ]

Maryam Vardeh, Anya : Please create an issue in the STCOM project and explain how to reproduce and which time zone you use (PC time zone, tenant time zone). The server chalmers.folio.ebsco.com is non-public, therefore a bug report against https://bugfest-iris.folio.ebsco.com/ or https://folio-snapshot.dev.folio.org/ is preferred. I cannot reproduce the issue in the edit forms of agreements and users.

 

Comment by Maryam Vardeh [ 15/Jun/21 ]

Yes this is still a problem i iris it seems.

Calendar that pops out in different apps shows the 15th of june 15th 2021 to be a wednesday, when in fact it is a tuesday.

Steps to reproduce:

  1. https://folio-iris.dev.folio.org/
  2. Settings, Tenant, Language and Localization, Change session locale
  3. Choose: English (Sweden).
  4. Go to user
  5. Action, New, expiration date (expiration date calendar that pops out shows the 15th of june 15th 2021 to be a wednesday, when in fact it is a tuesday.)
Comment by Julian Ladisch [ 15/Jun/21 ]

Maryam Vardeh Thank you, this is a different bug and is handled in STCOM-849 Closed "Wrong day of week in day picker calendar for some session locales"

Generated at Fri Feb 09 00:26:56 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.