[mythtv-users] Store Recording Previews in a seperate location

E. Westbrook mythtv-users at westbrook.com
Sat Nov 20 02:32:30 UTC 2010

If any work is being done on recording file naming conventions, I would like
to pipe in.  Please use truly unique filenames, either with an ID in them or
using UTC, to make them impervious to time/channel filename collisions and
other potential issues that exist today.

Every fall, in regions that observe daylight time, the possibility of a
filename collision exists during the duplicate hour.  This is because the
timestamp used is not in UTC, is not based on a file-unique ID, and does not
have a zone indicator like MST or MDT which would potentially clarify (e.g.
0115 MST / 0815 UTC is an hour after 0115 MDT / 0715 UTC) on that date in
the fall).

Best practice for time/date computing is to never use local times
internally, in filenames, or in database records.  Convert to UTC
immediately after input from a user or external source using local time, and
convert to local time at the last moment before UI presentation to the
user.  But I know the idea of implementing proper time/date coding practices
consistently throughout MythTV's codebase would likely receive strong
opposition, because it is admittedly a rather herculean effort, and has
benefit that is sometimes difficult to argue to all but the most
forward-thinking individuals.  (Do I sound like I speak from experience?

In any case, at the least, a unique ID prepended to the filename would solve
the daylight time filename collision case and surely many others as well.
Using UTC best practices would be an even better plan.

Simple version of this opinion:  In whatever form palatable, please consider
truly unique filenames in any rewrite effort.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20101119/e0e29c32/attachment.htm>

More information about the mythtv-users mailing list