[mythtv-commits] Ticket #11197: Fix event times in MythZoneMinder broken by the UTC changes
MythTV
noreply at mythtv.org
Wed Oct 24 13:42:52 UTC 2012
#11197: Fix event times in MythZoneMinder broken by the UTC changes
-------------------------------------+-----------------------------
Reporter: mythtv@… | Owner:
Type: Patch - Bug Fix | Status: new
Priority: minor | Milestone: unknown
Component: Plugin - MythZoneminder | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
-------------------------------------+-----------------------------
Comment (by dekarl@…):
Wouldn't the correct fix be to convert mythzoneminder to explicit time
offsets (or all UTC) instead of adding new ways to work with floating
time?
Telling MythDate to convert presumed UTC to UTC when it really way
localtime is a hack.
{{{
kOverrideUTC = 0x100000, // Present date/time in UTC
}}}
How about adding the conversion here:
http://code.mythtv.org/trac/browser/mythtv/mythplugins/mythzoneminder/mythzoneminder/zmclient.cpp#L338
maybe replacing
{{{
item->startTime = MythDate::fromString(sDate);
}}}
with a prettified variant of
{{{
item->startTime = MythDate::fromString(sDate);
item->startTime.setTimeSpec(Qt::LocalTime);
item->startTime = item->startTime.toUTC();
}}}
is all it takes
--
Ticket URL: <http://code.mythtv.org/trac/ticket/11197#comment:1>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list