Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in date display on comment #7561

Open
corentinbettiol opened this issue Apr 28, 2020 · 18 comments
Open

Error in date display on comment #7561

corentinbettiol opened this issue Apr 28, 2020 · 18 comments
Assignees
Labels
area: comments & notifications area concerning interactions or notifications with user area: internationalization/localization i18n and l10n bug smash Approved bugs for the DEV community bug smash bug always open for contribution external contributors welcome contribution is welcome!

Comments

@corentinbettiol
Copy link

Describe the bug

Date tag on a comment is "Apr 27", but on hover the text is "Tuesday, 28 April 2020, 00:01:19".

In HTML, datetime content is 2020-04-27T22:01:19Z 馃

To Reproduce

Hover date of this comment.

Expected behavior

Date on tag & on hover should be the same.

Screenshots

image

image

Desktop (please complete the following information):

  • OS: Xubuntu
  • Browser: Firefox
  • Version: 75.0
@rhymes
Copy link
Contributor

rhymes commented Apr 28, 2020

Thanks for the issue! We'll take your request into consideration and follow up if we decide to tackle this issue.

To our amazing contributors: issues labeled type: bug are always up for grabs, but for feature requests, please wait until we add a ready for dev before starting to work on it.

To claim an issue to work on, please leave a comment. If you've claimed the issue and need help, please ping @thepracticaldev/oss and we will follow up within 3 business days.

For full info on how to contribute, please check out our contributors guide.

@rhymes
Copy link
Contributor

rhymes commented Apr 28, 2020

Hi @corentinbettiol, thanks a lot for raising this issue.

I suspect it's similar to the issue that was raised for the article time in the show page: #7086 (I haven't checked but I'm pretty sure they use the same mechanism, both server side and client side)

This is what I wrote back then #7086 (comment)

I also left a possible solution: #7086 (comment)

@corentinbettiol
Copy link
Author

Thanks for the quick reply!

I spend a few minutes understanding how the title date is computed, and I replied with the information I found.

@nickytonline
Copy link
Contributor

@eclectic-coding and I will be pairing on this today. https://twitter.com/nickytonline/status/1287802825544732678

@eclectic-coding
Copy link

After reviewing this issue with @nickytonline we were unable to replicate. It is probable that the #9285 new local_date helper has resolved this issue. Please review and verify before this open issue is closed. If not, and it is still an issue, I will be glad to look at it again.
Thank you for the opportunity.

@corentinbettiol
Copy link
Author

I went on the link provided in the first post, "hovered" the date which is Apr 27 (I'm on a smartphone) and it displayed the "Mardi 28 Avril" date (Tue, Apr 28), so the Issue is still here :)

Screenshot_20200729-080140_1

@eclectic-coding
Copy link

So, for me, in the Eastern US, it displays properly on the Desktop (Linux/Firefox and Chrome), my Android phone with Firefox, and my wife's iPhone. I am wondering if this is an internationalization issue now?

@corentinbettiol
Copy link
Author

As I commented here on the other issue, I think only the date in title tag is localized, and thus the displayed date is still in UTC.

@rhymes
Copy link
Contributor

rhymes commented Jul 29, 2020

@corentinbettiol correct, the title is localized, the displayed date is not.

Back then we wanted to keep the same "english format" for all DEV users for all displayed dates, I would say let's keep it in English (so "July 29" instead of "29 Luglio" as it'd be in Italian) but have the correct date based on the client's locale, to avoid these issues when the UTC date crosses the day line

@corentinbettiol
Copy link
Author

Yes, it seems the right thing to do for now :)

@eclectic-coding
Copy link

I will go back and look at later today.

@ScottYates
Copy link

ScottYates commented Oct 5, 2020

I just made a comment on a post, and noticed that the displayed date was Oct 5, even though it was Oct 4 when i posted it, and the tooltip when i hover over that date appears to have the correct date in it.

In this case, i just clicked on the "Add to discussion" box and entered my comment, then pressed save.

Expected behavior
I expected the date displayed next to the comment to be correct.

Screenshots
Here is a capture of the issue:
https://www.screencast.com/t/ZLT50QsXtM1

Desktop (please complete the following information):
OS, version: Windows 10
Browser, version: Chrome 85.0.4183.121

Additional context
I am in Central Standard TZ.

Here is the comment in question:
https://dev.to/beernutz/comment/160li

This is the full page:
https://dev.to/maggiecodes_/problem-solving-during-interviews-for-anxious-people-2kpp/comments

@jorroll
Copy link

jorroll commented Nov 29, 2020

From issue #11643

Describe the bug
I posted this comment on dev.to around 11:30pm, 11/26/20 in California. I'm viewing the comment in the same location I posted the comment, and the "created on" date for the comment shows November 27th (it should show Nov 26th). I suspect a DST issue is the cause.

To Reproduce
You can see the problematic comment here: https://dev.to/johncarroll/comment/18dp8

Expected behavior
The date associated with my comment should be Nov 26th.

Desktop (please complete the following information):

  • OS, version: Chrome OS
  • Browser, version: Google Chrome, 86

Other info
Of note: the <time> element wrapping my comment's created on date has a title attribute the contains the correct created at time. It's just the text date that the <time> element is wrapping that is incorrect--further reinforcing my suspicion that this is a server DST issue.

@cmgorton cmgorton added the bug smash Approved bugs for the DEV community bug smash label May 4, 2021
@asi309
Copy link

asi309 commented May 6, 2021

I'd like to take this one @cmgorton

@cmgorton
Copy link
Contributor

cmgorton commented May 6, 2021

Great. Thank you! Let us know if you have any questions.

@cmgorton
Copy link
Contributor

Hey @asi309 wanted to check in and see how you are doing with this issue. Did you have any questions or need any help?

@asi309 asi309 removed their assignment May 27, 2021
@LizMelamed
Copy link

Hey! I would like to solve this bug as part of the bug smash

@citizen428
Copy link
Contributor

Thanks @LizMelamed, I assigned you this issue now.

@cmgorton cmgorton added area: comments & notifications area concerning interactions or notifications with user and removed area: comments labels Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: comments & notifications area concerning interactions or notifications with user area: internationalization/localization i18n and l10n bug smash Approved bugs for the DEV community bug smash bug always open for contribution external contributors welcome contribution is welcome!
Projects
None yet
Development

Successfully merging a pull request may close this issue.