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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with date format #5421

Closed
tristanleboss opened this issue Jul 13, 2019 · 6 comments · Fixed by #5451
Closed

Bug with date format #5421

tristanleboss opened this issue Jul 13, 2019 · 6 comments · Fixed by #5451
Labels
Status: Could not reproduce Issue cannot be reproduced Status: Need User Feedback Waiting on feedback from user who reported issue Type: Bug
Milestone

Comments

@tristanleboss
Copy link

tristanleboss commented Jul 13, 2019

I use a French WordPress installation with latest Pods and latest WordPress.
This is NOT a regression due to the date fix present in 2.7.14: the bug is here since a long time.

I have a "Date/Time" field set to use format "d/m/Y" ("dmy" is the select option value).

Capture done on July, 13th:
image

If I create a new content, it seems to work (I choose July, 8th):

image

If I save, I get this in the database (still July, 8th):

image

But, if I come back to the content, the date is wrong (July, 8th became August, 7th):

image

My WP Settings > General:

image

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label Type: Bug to this issue, with a confidence of 0.97. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@tristanleboss
Copy link
Author

tristanleboss commented Jul 13, 2019

The issue is from the code that render fields on a content page:

image

As seen on this screenshot, the value of the input field is wrong. We can see, the jQuery date picker is configured correctly.

@tristanleboss
Copy link
Author

tristanleboss commented Jul 13, 2019

To trigger the problem, you need to use an ambiguous date (with both day and month <= 12).

Indeed, if you use August, 21th, the input value will be set correctly to 21/08/2019. It's only wrong when you use ambiguous date.

@JoryHogeveen
Copy link
Member

@tristanleboss

I've been unable to reproduce your issue on my local installation.
Could you please test with WP Site Health enabled (under Tools). Please only enable Pods and test again.
If the problem still occurs please share some more info about your installation:

  • WP version
  • Other plugins
  • Browser
  • PHP version
  • etc.

Thanks in advance!

@JoryHogeveen JoryHogeveen added Status: Could not reproduce Issue cannot be reproduced Status: Need User Feedback Waiting on feedback from user who reported issue labels Aug 7, 2019
@tristanleboss
Copy link
Author

Hello, I will retest this next week on a fresh WP install ;)

@JoryHogeveen
Copy link
Member

Hello @tristanleboss

Forgot this issue.
This is probably be related to a "larger" issue with date fields and has been fixed in PR #5451
If you could also test this that would be great!

Thanks, Jory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Could not reproduce Issue cannot be reproduced Status: Need User Feedback Waiting on feedback from user who reported issue Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants