<div dir="ltr">On Mon, Apr 25, 2016 at 12:41 AM Casey McGinty <<a href="mailto:casey.mcginty@gmail.com" target="_blank">casey.mcginty@gmail.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I believe I tracked this down to a time conversion bug in the Python API. <br></div></div></blockquote><div><br><br></div><div>Raymond W. helped me locate the time conversion logic error in dt.py. In my case I didn't need the time in local format, so there is a quick way to monkey patch the Python API bindings to resolve the issue. I hope someone will find this useful.<br><br><pre># MythTV datetime's (dt.py) custom tzinfo (posixtzinfo) has a bug that can
# corrupt the recording's timestmap in the client. We don't really care about
# local date format, therefore the bug can be fixed by setting all timestamps to
# integers and bypassing and conversion bugs.
from MythTV.altdict import DictData
TIMESTAMP_FIELD_INDEX = 4
DictData._trans[TIMESTAMP_FIELD_INDEX] = int
DictData._inv_trans[TIMESTAMP_FIELD_INDEX] = str</pre><br></div><div>This works on the MythTV Python binding distributed with Ubuntu 14.04 server, but it may need to be adjusted for you local version.<br><br></div><div>Casey McGinty<br></div></div></div>