[mythtv-users] Frontend to Backend (different timezone) ?

Keith Pyle kpyle at austin.rr.com
Mon Nov 8 16:18:07 UTC 2010


  On 11/08/10 06:00, Alessandro wrote:
> I am living in France, but my mythbox is in UK time (simpler that way,
> as all my recordings are from FreeSat UK etc etc).
> However, I have a macbook running mythfront end that I want to connect
> to the backend to watch recordings/live TV etc - but, I need to change
> my macbook's timezone before it will work correctly.
> The frontend app just crashes, if the mac is not configured to as UK
> timezone like the backend.
>
> Is there a way to 'trick' the frontend or backend so that I don't need
> to keep changing my macbook's timezone each time I open the front end?
> (and save setting it back to France time when closing the frontend
> app) !!
>
You can set the timezone independently for each process on a UNIX system 
through the TZ environment variable.  For example,

% date
Mon Nov  8 10:10:08 CST 2010
%  TZ=PST8PDT date
Mon Nov  8 08:10:10 PST 2010
% TZ=Paris date
Mon Nov  8 16:10:14 Paris 2010

This syntax applies the environment variable only to the command 
following it.  It does not set the value into the environment of the 
shell where you typed the command.

You could simply put the desired zone name (e.g., London) into the TZ 
variable and change the "date" command above to your front-end command 
(with whatever options you want).  Of course, you could also have a 
small shell script that sets the environment variable and then runs the 
front-end to reduce typing.  (To see a list of available timezone names, 
look in /usr/share/zoneinfo and its subdirectories.)

By doing it this way, the environment variable change affects *only* the 
front-end startup and all other processes on the system continue using 
the normal time zone.

Note that this technique works for any environment variable, not just TZ.

Keith

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


More information about the mythtv-users mailing list