-
Notifications
You must be signed in to change notification settings - Fork 2
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
Show leading zeros on minutes in shared link expiration display #393
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think timezone might be an issue now (or always was). See my comment below:
lib/utils/date-helpers.test.ts
Outdated
describe("formatDateLong", () => { | ||
test("should format date correctly in long format", () => { | ||
const result = formatDateLong("2023-11-14T13:14:00Z"); | ||
expect(result).toBe("November 14, 2023, 1:14pm"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting:
formatDateLong › should format date correctly in long format
expect(received).toBe(expected) // Object.is equality
Expected: "November 14, 2023, 1:14pm"
Received: "November 14, 2023, **8:14am"**
I think this might be related timezones and the Z
in the date. Not sure how to best proceed here but I'm happy to sit with you to figure out your local tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mathewjordan - updated to account for local time zones. The test is a little wonky but hopefully good enough.
d926600
to
83ec6cc
Compare
83ec6cc
to
bbb72d1
Compare
@mathewjordan - this is ready for a re-review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
1:06pm
instead of1:6pm
Steps to Test