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

date field gives errormessage when autopopulated with time #1284

Closed
cremol opened this issue May 2, 2012 · 3 comments
Closed

date field gives errormessage when autopopulated with time #1284

cremol opened this issue May 2, 2012 · 3 comments

Comments

@cremol
Copy link

cremol commented May 2, 2012

When the datefield is autopopulated with for example: 02.05.12 11:29 am, it throw's an errormessage,
Removing the time from the inputfield will do... and the time is saved in the database.
But when resaving the errormessage shows again, cause the date will be autopopulated again.

@brendo
Copy link
Member

brendo commented May 2, 2012

What version of PHP are you running and what are your region settings (inside manifest/config.php)

@brendo
Copy link
Member

brendo commented May 2, 2012

Odd, I can confirm, an Exception is thrown

Exception: DateTime::__construct() [<a href='datetime.--construct'>datetime.--construct</a>]: Failed to parse time string (02.05.12 11:29 am) at position 9 (1): Double time specification

@brendo
Copy link
Member

brendo commented May 2, 2012

Looks like our DateTimeObj::validate function is too simple to fully determine if a date is valid or not. It doesn't attempt to parse. Can fix, thanks for the report :)

@brendo brendo closed this as completed in f5eb676 May 2, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants