{"action":"created","issue":{"url":"https://api.github.com/repos/Razzeee/script.trakt/issues/166","labels_url":"https://api.github.com/repos/Razzeee/script.trakt/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/Razzeee/script.trakt/issues/166/comments","events_url":"https://api.github.com/repos/Razzeee/script.trakt/issues/166/events","html_url":"https://github.com/Razzeee/script.trakt/issues/166","id":63092167,"number":166,"title":"Time issues cause trakt sync to crash ","user":{"login":"SurfingSpider","id":11552822,"avatar_url":"https://avatars.githubusercontent.com/u/11552822?v=3","gravatar_id":"","url":"https://api.github.com/users/SurfingSpider","html_url":"https://github.com/SurfingSpider","followers_url":"https://api.github.com/users/SurfingSpider/followers","following_url":"https://api.github.com/users/SurfingSpider/following{/other_user}","gists_url":"https://api.github.com/users/SurfingSpider/gists{/gist_id}","starred_url":"https://api.github.com/users/SurfingSpider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SurfingSpider/subscriptions","organizations_url":"https://api.github.com/users/SurfingSpider/orgs","repos_url":"https://api.github.com/users/SurfingSpider/repos","events_url":"https://api.github.com/users/SurfingSpider/events{/privacy}","received_events_url":"https://api.github.com/users/SurfingSpider/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-19T21:16:07Z","updated_at":"2015-03-20T09:08:14Z","closed_at":null,"body":"I am also having problems related to time I think. I have also seen a couple of other posts about it on the kodi forums .I was hoping you could point me in the right direction.\r\n\r\nI have seen Razee ask someone with a related issue (on the kodi forum).... \r\n```Please check your system time and are you using mysql or edited the sqlite library? Do you have anything collected or watched with a year outside of 1970 to 2038? What's your timezone?).```\r\n\r\nI am running win7, kodi 14.2 rc & MySQL setup all clocks are synced to GMT. I have Trakt addon v3.0.0 installed. I also have tv series from 1940 (tom & jerry, 5 year old loves it)\r\n\r\nHere is the relevant section of my logs...\r\n```\r\n19:53:54 T:3984   ERROR: Exception in thread trakt-sync:\r\n                                            Traceback (most recent call last):\r\n                                              File \"C:\\Program Files\\Kodi\\system\\python\\Lib\\threading.py\", line 810, in __bootstrap_inner\r\n                                                self.run()\r\n                                              File \"C:\\Users\\Administrator\\AppData\\Roaming\\Kodi\\addons\\script.trakt\\service.py\", line 281, in run\r\n                                                sync.sync()\r\n                                              File \"C:\\Users\\Administrator\\AppData\\Roaming\\Kodi\\addons\\script.trakt\\sync.py\", line 945, in sync\r\n                                                self.__syncEpisodes()\r\n                                              File \"C:\\Users\\Administrator\\AppData\\Roaming\\Kodi\\addons\\script.trakt\\sync.py\", line 514, in __syncEpisodes\r\n                                                kodiShowsCollected, kodiShowsWatched = self.__kodiLoadShows()\r\n                                              File \"C:\\Users\\Administrator\\AppData\\Roaming\\Kodi\\addons\\script.trakt\\sync.py\", line 86, in __kodiLoadShows\r\n                                                show['seasons'] = utilities.kodiRpcToTraktMediaObjects(data)\r\n                                              File \"C:\\Users\\Administrator\\AppData\\Roaming\\Kodi\\addons\\script.trakt\\utilities.py\", line 390, in kodiRpcToTraktMediaObjects\r\n                                                episodeObject = kodiRpcToTraktMediaObject('episode', episode, mode)\r\n                                              File \"C:\\Users\\Administrator\\AppData\\Roaming\\Kodi\\addons\\script.trakt\\utilities.py\", line 336, in kodiRpcToTraktMediaObject\r\n                                                episode['watched_at'] = convertDateTimeToUTC(data['lastplayed'])\r\n                                              File \"C:\\Users\\Administrator\\AppData\\Roaming\\Kodi\\addons\\script.trakt\\utilities.py\", line 420, in convertDateTimeToUTC\r\n                                                utc = local.astimezone(tzutc())\r\n                                              File \"C:\\Users\\Administrator\\AppData\\Roaming\\Kodi\\addons\\script.module.dateutil\\lib\\dateutil\\tz.py\", line 113, in utcoffset\r\n                                                if self._isdst(dt):\r\n                                              File \"C:\\Users\\Administrator\\AppData\\Roaming\\Kodi\\addons\\script.module.dateutil\\lib\\dateutil\\tz.py\", line 157, in _isdst\r\n                                                return time.localtime(timestamp+time.timezone).tm_isdst\r\n                                            ValueError: (22, 'Invalid argument')\r\n```\r\nAt the moment if you run a manual sync it runs through all the movies fine, but gets stuck at... \"Loading episode data from kodi, Parsing 3 of 44 episode data from kodi\". After that I have to crash out of kodi\r\n\r\nany help will be much appreciated. Please forgive any ignorance on my part I don't by a long stretch call myself a programmer more an educated user. "},"comment":{"url":"https://api.github.com/repos/Razzeee/script.trakt/issues/comments/83960229","html_url":"https://github.com/Razzeee/script.trakt/issues/166#issuecomment-83960229","issue_url":"https://api.github.com/repos/Razzeee/script.trakt/issues/166","id":83960229,"user":{"login":"Razzeee","id":5943908,"avatar_url":"https://avatars.githubusercontent.com/u/5943908?v=3","gravatar_id":"","url":"https://api.github.com/users/Razzeee","html_url":"https://github.com/Razzeee","followers_url":"https://api.github.com/users/Razzeee/followers","following_url":"https://api.github.com/users/Razzeee/following{/other_user}","gists_url":"https://api.github.com/users/Razzeee/gists{/gist_id}","starred_url":"https://api.github.com/users/Razzeee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Razzeee/subscriptions","organizations_url":"https://api.github.com/users/Razzeee/orgs","repos_url":"https://api.github.com/users/Razzeee/repos","events_url":"https://api.github.com/users/Razzeee/events{/privacy}","received_events_url":"https://api.github.com/users/Razzeee/received_events","type":"User","site_admin":false},"created_at":"2015-03-20T09:08:14Z","updated_at":"2015-03-20T09:08:14Z","body":"Well it's not about shows or movies that are from before 1970.\r\nIt's about movies/episodes where you have set the 'lastplayed' or 'dateadded' fields in your mysql to something outside of 1970 to 2038\r\nSo thats what we hould look for, it's pretty easy to query this from mysql (at least if you got one right before you)"}}