{"action":"created","issue":{"url":"https://api.github.com/repos/Kozea/pygal/issues/193","labels_url":"https://api.github.com/repos/Kozea/pygal/issues/193/labels{/name}","comments_url":"https://api.github.com/repos/Kozea/pygal/issues/193/comments","events_url":"https://api.github.com/repos/Kozea/pygal/issues/193/events","html_url":"https://github.com/Kozea/pygal/issues/193","id":58825296,"number":193,"title":"Lost hours/minute with DateY plots","user":{"login":"biolds","id":4569027,"avatar_url":"https://avatars.githubusercontent.com/u/4569027?v=3","gravatar_id":"","url":"https://api.github.com/users/biolds","html_url":"https://github.com/biolds","followers_url":"https://api.github.com/users/biolds/followers","following_url":"https://api.github.com/users/biolds/following{/other_user}","gists_url":"https://api.github.com/users/biolds/gists{/gist_id}","starred_url":"https://api.github.com/users/biolds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biolds/subscriptions","organizations_url":"https://api.github.com/users/biolds/orgs","repos_url":"https://api.github.com/users/biolds/repos","events_url":"https://api.github.com/users/biolds/events{/privacy}","received_events_url":"https://api.github.com/users/biolds/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-24T23:40:28Z","updated_at":"2015-03-31T15:53:37Z","closed_at":null,"body":"Using today's master, with python 2.7:\r\nWhile plotting a DateY graph, it seems pygal loses the hours and minutes part of a datetime.datetime object passed to it.\r\n\r\nThe bug happens in pygal/graph/time.py, in the function date_to_datetime:\r\nthe datetime object matches the condition isinstance(x, date), and then the datetime.combine(x, time()) call removes the hours and minutes.\r\n\r\nI don't understand what the call to combine() is supposed to do, or if the isinstance wasn't expected to match a datetime object. any hint how to fix this ?\r\n\r\n(Pdb) bt\r\n  /home/lds/tmp/stati.py(36)<module>()\r\n-> datey.render_to_file('stat.svg')\r\n  /home/lds/bin/pygal/pygal/ghost.py(165)render_to_file()\r\n-> f.write(self.render(is_unicode=True, **kwargs))\r\n  /home/lds/bin/pygal/pygal/ghost.py(122)render()\r\n-> .make_instance(overrides=kwargs)\r\n  /home/lds/bin/pygal/pygal/ghost.py(111)make_instance()\r\n-> series = self.make_series(self.raw_series)\r\n  /home/lds/bin/pygal/pygal/ghost.py(100)make_series()\r\n-> return prepare_values(series, self.config, self.cls, offset)\r\n  /home/lds/bin/pygal/pygal/util.py(412)prepare_values()\r\n-> value = (x_adapter(value[0]), adapter(value[1]))\r\n  /home/lds/bin/pygal/pygal/util.py(323)<lambda>()\r\n-> fun = lambda *args, **kwargs: f(g(*args, **kwargs))\r\n> /home/lds/bin/pygal/pygal/graph/time.py(37)date_to_datetime()\r\n-> return datetime.combine(x, time())\r\n(Pdb) print x\r\n2015-01-12 11:37:00\r\n(Pdb) print datetime.combine(x, time())\r\n2015-01-12 00:00:00\r\n(Pdb) \r\n"},"comment":{"url":"https://api.github.com/repos/Kozea/pygal/issues/comments/88140870","html_url":"https://github.com/Kozea/pygal/issues/193#issuecomment-88140870","issue_url":"https://api.github.com/repos/Kozea/pygal/issues/193","id":88140870,"user":{"login":"ericpulvino","id":7875697,"avatar_url":"https://avatars.githubusercontent.com/u/7875697?v=3","gravatar_id":"","url":"https://api.github.com/users/ericpulvino","html_url":"https://github.com/ericpulvino","followers_url":"https://api.github.com/users/ericpulvino/followers","following_url":"https://api.github.com/users/ericpulvino/following{/other_user}","gists_url":"https://api.github.com/users/ericpulvino/gists{/gist_id}","starred_url":"https://api.github.com/users/ericpulvino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericpulvino/subscriptions","organizations_url":"https://api.github.com/users/ericpulvino/orgs","repos_url":"https://api.github.com/users/ericpulvino/repos","events_url":"https://api.github.com/users/ericpulvino/events{/privacy}","received_events_url":"https://api.github.com/users/ericpulvino/received_events","type":"User","site_admin":false},"created_at":"2015-03-31T15:53:37Z","updated_at":"2015-03-31T15:53:37Z","body":"Haha the CPU graph looks bizarre without the Hour/Minute data.\r\n![bad_timegraph](https://cloud.githubusercontent.com/assets/7875697/6922924/88447fb8-d79c-11e4-9a16-89c9cdf60fd7.png)\r\n"}}