[mythtv-users] MythTV does not handle daylight savings properly

Jens Holzhäuser Jens.Holzhaeuser at gmx.net
Fri Nov 9 02:01:41 UTC 2012


On Mon, Nov 05, 2012 at 01:16:39PM -0500, Brian J. Murrell wrote:
> On 12-11-05 01:08 PM, Wim wrote:
> > 
> > My rule now looks like this and it works
> > 
> > program.title LIKE '%de wereld draait door%'
> > AND channel.callsign like '%ned%'
> > AND
> > HOUR(CONVERT_TZ(program.starttime, 'UTC', 'SYSTEM'))>=19
> > AND HOUR(CONVERT_TZ(program.starttime, 'UTC', 'SYSTEM'))<=21
> > 
> > Can't say I think this is user friendly.
> 
> Indeed, no.  I do agree.  Users should not have to confront the
> vulgarities of UTC conversion.
> 
> If every custom record rule needs every time specification in them
> converted to/from UTC, that should be done internally, IMHO.

How about something like this (minimal example):

  create or replace view program_vw as select program.title,
  CONVERT_TZ(starttime, 'UTC', 'SYSTEM') starttime_local from program;

and using the view for your custom rules:

  program_vw.title LIKE '%de wereld draait door%' 
  AND channel.callsign like '%ned%' 
  AND HOUR(program_vw.starttime_local)>=19 
  AND HOUR(program_vw.starttime_local)<=21


	Jens


More information about the mythtv-users mailing list