[mythtv-users] Filename Hell

Bill Meek keemllib at gmail.com
Mon Nov 19 19:15:07 UTC 2018


On 11/19/18 10:23 AM, John Pilkington wrote:
> On 19/11/18 12:33, jam at tigger.ws wrote:
>>
>>
>>> On 19 Nov 2018, at 6:47 pm, mythtv-users-request at mythtv.org wrote:
>>>
>>>> First who is helped by having file names dated in zulu (Thats an official name for GMT+0) cartainly I?m not. Recordings made at
>>>> 12-01 10 september are named eg *201809091601* but
>>>> 11-59 10 september are named eg *201809100359*     (sorry if I made an error, but the pic is clear. Perth GMT+8)
>>>
>>> Zulu time is the military name for Coordinated Universal Time (UTC).
>>> GMT (Greenwich Mean Time) does not exist and has not existed since the
>>> UTC time standard was established last century and was legislated in
>>> most countries to become the only time standard.  But people often
>>> still refer to the UTC+0 time zone as GMT.
>>
>> Actually used in civil aviation too.
>>
>>>> So in a moment of inspiration
>>>>
>>>> [sandypit] /home/jam [902]% mythtv/mythtv/contrib/user_jobs/mythlink.pl --link /store/pretty --format '%T/%T%-%S'
>>>> Base class package "IO::Socket::INET6" is empty.
>>>>    (Perhaps you need to 'use' the module which defines that package first,
>>>>    or make that module available in @INC (@INC contains: /usr/lib/perl5/site_perl/5.18.2/x86_64-linux-thread-multi 
>>>> /usr/lib/perl5/site_perl/5.18.2 /usr/lib/perl5/vendor_perl/5.18.2/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.18.2 
>>>> /usr/lib/perl5/5.18.2/x86_64-linux-thread-multi /usr/lib/perl5/5.18.2 /usr/lib/perl5/site_perl .).
>>>> at /usr/lib/perl5/vendor_perl/5.18.2/IO/Socket/INET/MythTV.pm line 14.
>>>> BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.18.2/IO/Socket/INET/MythTV.pm line 14.
>>>> Compilation failed in require at /usr/lib/perl5/vendor_perl/5.18.2/MythTV.pm line 14.
>>>> BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.18.2/MythTV.pm line 14.
>>>> Compilation failed in require at mythtv/mythtv/contrib/user_jobs/mythlink.pl line 22.
>>>> BEGIN failed--compilation aborted at mythtv/mythtv/contrib/user_jobs/mythlink.pl line 22.
>>>>
>>>> Is there a list (and presumably cpan) instruction to get the script to work
>>>>
>>>> James
>>>
>>> The reason for using UTC in the file names is to prevent clashes of
>>> file names.  If you use local time anywhere there is a daylight saving
>>> time change where the time goes backwards, you get an overlapping time
>>> period when the same times occur again.  So if you record programmes
>>> from the same channel, one at 02:00 (daylight saving time), then the
>>> clock goes back from 03:00 to 02:00 and you record another one hour
>>> later at 02:00 again, they will get the same file name and that will
>>> break mythbackend.
>>
>> being part of the ludite community of Perth who think daylight saving is a fate worse than death I had not considered the obvious <blush>
>> On UTC  I Really did know that, but sloth and every list that I have ever seen (incorrectly) times zones in a  format that includes GMT+0, 
>> GMT+1 etc etc. Does 100 lines punishment :-)
>>
>> The wiki still sucks because having followed it, and then wasted a few hours it still does not work, next time I’m bored I’ll write a QT C++ 
>> (QT ‘cause all the DB stuff is trivial) version of mythlink.
>> Just testing the waters, are all the format options useful (ie do I include them all in a contributed script, or is everyone happy that it 
>> works just fine?
>>
>> James
> 
> I haven't tried to use mythlink to apply timezone offsets, but before you get deeply involved in it you might like to know that 30-pre has just 
> acquired the MythTV.services_api module which addresses this - and more.  Coming soon to a repo near you...
> 
> utc_to_local(utctime='', omityear=False, omitseconds=True)
> 
> https://github.com/MythTV/mythtv/commit/26d8d510589d4dc9adf72d14e9837774425faff8

Also note that tools like mythlink.pl might be run as user jobs and UTC time
is easily passed. See: https://www.mythtv.org/wiki/User_Jobs#User_Job_arguments
Example: %STARTTIMEUTC% (full disclosure, I don't use mythlink.pl.) No math
required.

-- 
Bill


More information about the mythtv-users mailing list