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

DateTimeImmutable::createFromFormat with ! returns DateTime #30

Open
wizbit opened this issue Oct 3, 2017 · 1 comment
Open

DateTimeImmutable::createFromFormat with ! returns DateTime #30

wizbit opened this issue Oct 3, 2017 · 1 comment

Comments

@wizbit
Copy link

wizbit commented Oct 3, 2017

When creating a datetimeimmutable object with ! in the format (to zero the time). I get a DateTime object returned.

Test: echo get_class(\DateTimeImmutable::createFromFormat('!Y-m-d', '2017-10-03'));
expected: DateTimeImmutable
got: DateTime

IonBazan pushed a commit to IonBazan/php-timecop that referenced this issue Nov 8, 2017
IonBazan pushed a commit to IonBazan/php-timecop that referenced this issue Nov 8, 2017
IonBazan pushed a commit to IonBazan/php-timecop that referenced this issue Nov 8, 2017
cs278 referenced this issue in kiddivouchers/php-timecop Jun 19, 2018
@Furgas
Copy link

Furgas commented Jan 21, 2019

Yeah, I thought I found some weird bug in PHP. Fortunately I rather quickly found out that it was timecop's fault. I guess we're not going to see it fixed soon :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants