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

switch to use datetimetz fields #19

Closed
wants to merge 1 commit into from
Closed

Conversation

basz
Copy link
Collaborator

@basz basz commented Apr 28, 2017

#18

@coveralls
Copy link

coveralls commented Apr 28, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 4516ed2 on basz:datetime-timezone into eec2368 on zf-fr:master.

@prolic
Copy link
Collaborator

prolic commented Apr 28, 2017

What about DoctrineExtensions\DBAL\Types\UTCDateTimeType ?

@basz
Copy link
Collaborator Author

basz commented Apr 28, 2017

That would introduce a dependency dont you think. I think you must register that type and use the utcdatetime type.

Since by default doctrine reads datetime in the default tz of php, wouldn't it be simpler to just write them in the php default tz too?

Strange that this problem hasn't been solved in a decent way...

@basz
Copy link
Collaborator Author

basz commented Apr 28, 2017

ok, not

Type::overrideType('datetime', UTCDateTimeType::class);
Type::overrideType('datetimetz', UTCDateTimeType::class);

then it would be an application concern, wouldn't you agree? The user implements UTCDateTimeType and knowingly overrides the doctrine provided DateTimeType.

@prolic
Copy link
Collaborator

prolic commented Apr 29, 2017 via email

@basz
Copy link
Collaborator Author

basz commented Apr 29, 2017

I implemented this. Thx for the pointer, works great

@basz basz closed this Apr 29, 2017
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

Successfully merging this pull request may close these issues.

3 participants