BUG: Fix to_dict() problem when using datetime DataFrame #11247
closes #11247

This is my first time contributing through PR so forgive me if I make any silly mistake.
The issue can be referred to in GH11247
I followed @jreback 's suggestion to box things up in `to_dict()` but I am not sure if this is what he means because I do not know exactly when `_maybe_datetime()` should be used. Initially I tried to tweak `internals.py` but it fails.

Let me know how I can improve from here. Hope I can really learn from my first PR.

see guidelines here: http://pandas.pydata.org/pandas-docs/stable/contributing.html

dont' turn on PEP changes for your editor.
 I think I forgot to fetch to update my local master before my first commit to this PR. Somehow I messed up is it true?
 add tests! (ideally for each one of the orients if we dont' have already).
 which test case shall I add in? I am new to this :)

> On 15 Oct 2015, at 2:50 AM, Jeff Reback notifications@github.com wrote:
> 
> add tests! (ideally for each one of the orients if we dont' have already).
> 
> —
> Reply to this email directly or view it on GitHub https://github.com/pydata/pandas/pull/11327#issuecomment-148154675.
 @jreback I have added tests:)
 pls add a whatsnew note for 0.17.1 in bug fixes
 Just asking what I should do if I merge updates locally with my branch and need to merge the 2 commits into one..

—
Sent from Mailbox

On Fri, Oct 16, 2015 at 6:25 AM, Jeff Reback notifications@github.com
wrote:

> ## pls add a whatsnew note for 0.17.1 in bug fixes
> 
> Reply to this email directly or view it on GitHub:
> https://github.com/pydata/pandas/pull/11327#issuecomment-148540340
 merged via https://github.com/pydata/pandas/commit/89b4e5b7337606f3e1e40a3d13be863a8be6ff44

thanks!
