{"action":"created","issue":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/22711","repository_url":"https://api.github.com/repos/pandas-dev/pandas","labels_url":"https://api.github.com/repos/pandas-dev/pandas/issues/22711/labels{/name}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/22711/comments","events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/22711/events","html_url":"https://github.com/pandas-dev/pandas/issues/22711","id":360362892,"node_id":"MDU6SXNzdWUzNjAzNjI4OTI=","number":22711,"title":"pd.Timestamp.today() / pd.to_datetime('today') returns date with time information","user":{"login":"charlesoblack","id":18634426,"node_id":"MDQ6VXNlcjE4NjM0NDI2","avatar_url":"https://avatars2.githubusercontent.com/u/18634426?v=4","gravatar_id":"","url":"https://api.github.com/users/charlesoblack","html_url":"https://github.com/charlesoblack","followers_url":"https://api.github.com/users/charlesoblack/followers","following_url":"https://api.github.com/users/charlesoblack/following{/other_user}","gists_url":"https://api.github.com/users/charlesoblack/gists{/gist_id}","starred_url":"https://api.github.com/users/charlesoblack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charlesoblack/subscriptions","organizations_url":"https://api.github.com/users/charlesoblack/orgs","repos_url":"https://api.github.com/users/charlesoblack/repos","events_url":"https://api.github.com/users/charlesoblack/events{/privacy}","received_events_url":"https://api.github.com/users/charlesoblack/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-09-14T15:58:15Z","updated_at":"2018-09-15T03:17:35Z","closed_at":"2018-09-14T16:54:33Z","author_association":"NONE","body":"Calling **pd.Timestamp.today()** or **pd.to_datetime('today')** returns both the date and time information. This is unexpected behavior since the time information should be returned with **.now()** or **'now'**, respectively, while the **.today()** and **'today'** should trim to simply the date information.\r\n\r\nExample code:\r\n\r\n```python\r\nimport pandas as pd\r\nprint(pd.Timestamp.today())\r\nprint(pd.to_datetime('today'))\r\n```\r\n\r\n#### Expected Output\r\n\r\npd.Timestamp('2018-09-14 00:00:00')\r\n\r\n#### Output of ``pd.show_versions()``\r\n\r\n<details>\r\nINSTALLED VERSIONS\r\n------------------\r\ncommit: None\r\npython: 3.7.0.final.0\r\npython-bits: 64\r\nbyteorder: little\r\nLANG: en_US.UTF-8\r\nLOCALE: None.None\r\n\r\npandas: 0.23.4\r\npytest: None\r\npip: 18.0\r\nsetuptools: 39.0.1\r\nCython: 0.28.5\r\nnumpy: 1.15.1\r\nscipy: 1.1.0\r\npyarrow: None\r\nxarray: None\r\nIPython: 6.5.0\r\nsphinx: None\r\npatsy: None\r\ndateutil: 2.7.3\r\npytz: 2018.5\r\nblosc: None\r\nbottleneck: None\r\ntables: None\r\nnumexpr: None\r\nfeather: None\r\nmatplotlib: 2.2.3\r\nopenpyxl: 2.5.4\r\nxlrd: 1.1.0\r\nxlwt: 1.3.0\r\nxlsxwriter: 1.0.5\r\nlxml: None\r\nbs4: None\r\nhtml5lib: 1.0.1\r\nsqlalchemy: None\r\npymysql: None\r\npsycopg2: None\r\njinja2: 2.10\r\ns3fs: None\r\nfastparquet: None\r\npandas_gbq: None\r\npandas_datareader: None\r\n</details>\r\n"},"comment":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/comments/421526760","html_url":"https://github.com/pandas-dev/pandas/issues/22711#issuecomment-421526760","issue_url":"https://api.github.com/repos/pandas-dev/pandas/issues/22711","id":421526760,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTUyNjc2MA==","user":{"login":"charlesoblack","id":18634426,"node_id":"MDQ6VXNlcjE4NjM0NDI2","avatar_url":"https://avatars2.githubusercontent.com/u/18634426?v=4","gravatar_id":"","url":"https://api.github.com/users/charlesoblack","html_url":"https://github.com/charlesoblack","followers_url":"https://api.github.com/users/charlesoblack/followers","following_url":"https://api.github.com/users/charlesoblack/following{/other_user}","gists_url":"https://api.github.com/users/charlesoblack/gists{/gist_id}","starred_url":"https://api.github.com/users/charlesoblack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charlesoblack/subscriptions","organizations_url":"https://api.github.com/users/charlesoblack/orgs","repos_url":"https://api.github.com/users/charlesoblack/repos","events_url":"https://api.github.com/users/charlesoblack/events{/privacy}","received_events_url":"https://api.github.com/users/charlesoblack/received_events","type":"User","site_admin":false},"created_at":"2018-09-15T03:17:35Z","updated_at":"2018-09-15T03:17:35Z","author_association":"NONE","body":"Ah, gotcha. Thank you! Is there an alternative then for getting today's\ndate?\n\nOn Fri, Sep 14, 2018, 10:15 PM Matthew Roeschke <notifications@github.com>\nwrote:\n\n> This is from the datetime.now\n> <https://docs.python.org/2/library/datetime.html#datetime.datetime.today>\n> docs which Timestamp follows:\n>\n> If optional argument tz is None or not specified, this is like today()\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/pandas-dev/pandas/issues/22711#issuecomment-421526680>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ARxWuk85Uu1hyEM9rENAB1NnTP_tffb2ks5ubHDtgaJpZM4WpiFb>\n> .\n>\n"}}
{"actor":{"display_login":"charlesoblack"}}