-
Notifications
You must be signed in to change notification settings - Fork 445
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
Safari shows incorrect reviewer assignment information #7900
Comments
Hey @asmecher, this was an issue in the way Safari's JavaScript PRs:
|
Thanks, @ewhanson! @NateWr, could you review the above PRs? [edit: unless this was already sufficient? https://github.com/pkp/ui-library/pull/200#issuecomment-1118319912] |
Thanks @ewhanson. The solution looks good. Does this effect any use of |
And if so, then we may want to roll |
Yes, I'll get the PRs updated to use |
Hey @asmecher, in looking to address this for First, in the past week, I must have updated my version of macOS, because the most recent version of Safari (15.4) now has support for parsing dates in the 'YYYY-MM-DD' format. Because Safari updates are tied to OS updates, it's a bit hard to find an older version of Safari for testing. A good sign over all that it's been fixed, but not immediately helpful for users not on the latest version of Safari. Second, there appears to be a difference in the way JS handles the different date string formats:
I need to do some more digging, but this doesn't look great. Ultimately, using the A couple of questions:
|
@ewhanson, yuck. Is there official documentation for this behaviour? Maybe a polyfill or something 3rd party that we can rely on? |
@asmecher, I'll do some digging and see what I turn up. |
I couldn't find any Apple-specific documentation on how Safari parses date strings, but in general, MDN recommend against using In terms of 3rd party solutions, I came across what looks like the best candidate to me: Day.js. I found it via Moment.js's recommended alternatives. It's small (they say 2kb), has zero dependencies, and is an active project (latest version was released two weeks ago). This may still be overkill for our needs, though. I tried installing it and inserting it into the Vue components, to see how it worked. It's usage would look something like |
I'd like @NateWr's sober second thought on this, but I like the library you've identified, and would prefer we rely on something like that than reinvent the wheel. Eventually we can move from there to the temporal API. 👍 |
Thanks for digging into this, @ewhanson. On the library, we're already using
Maybe you can use Date.parse() with a timezone to force UTC timezone? Date.parse('2022-05-16T00:00:01.000+00:00');
No, this only effects the dates that someone uses to request stats. It doesn't effect how stats are recorded.
I think we're ok here. The UI should always show the date that was requested, rather than getting stats to May 15 but displaying stats to May 16. As I said, though, if |
Thanks @NateWr, I hadn't noticed we were already using |
pkp/pkp-lib#7900 Safari shows incorrect reviewer assignment information
pkp/pkp-lib#7900 Safari shows incorrect reviewer assignment information
Thanks, @ewhanson, I've merged those! |
Describe the bug
From https://forum.pkp.sfu.ca/t/days-since-last-review-errors-in-ojs/72558:
Later...
What application are you using?
OJS 3.3.0-8
The text was updated successfully, but these errors were encountered: