[Updated] Embedded Plex Media Player x86_64: Workaround to reflect localtime in UI

plex-media-player

#1

Superceded, see last post at bottom for much simpler solution.

~~This is a SHORT-TERM workaround for all Embedded Plex Media Player x86_64 users that want the UI clock to reflect their localtime instead of UTC time. The required commands need to be in .config/autostart.sh for execution at initial bootup.~~

~~You can issue ls -l /usr/share/zoneinfo/ to list the region names. Then ls -l /usr/share/zoneinfo/INPUT_REGION_HERE/ to list all the timezone names for the specified region.~~

~~The line below is required so that the desired timezone is loaded as a userspace environment variable:~~
~~* E.g. export TZ=America/Los_Angeles~~

~~The two line belows are required and must be placed as the last two lines in your autostart.sh:~~
~~* systemctl stop plex Stops the system level Plex Media Player service~~
~~* plexmediaplayer --fullscreen --tv --scale-factor=1 Starts Plex Media Player as a user process that inherits the user space timezone environment variable~~

~~If you happen to have xrandr or other commands in your autostart.sh, they need to be placed above systemctl stop plex in autostart.sh -- otherwise they may not execute.~~

~~Caveats:~~
~~* When running plexmediaplayer as a user-space process, if plexmediaplayer is terminated via the Exit button in the UI -- it will not restart and you will be left with a black screen. This requires an SSH session to restart the process with plexmediaplayer --fullscreen --tv --scale-factor=1.~~
~~* It may output the following error which should be harmless:~~
~~[0218/015508:ERROR:browser_main_loop.cc(217)] Running without the SUID sandbox! See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the sandbox on.~~


#2

Superceded, see last post at bottom for much simpler solution.

Kudos to @raven-au who has suggested a workaround that is much easier to institute without the caveats from my workaround. I have tested it on my Embedded Plex Media Player x86_64 install and it worked for me. Please give it a try.

mkdir /storage/.config/system.d/plex.service.d
cd /storage/.config/system.d/plex.service.d
create tz.conf using either nano tz.conf or vi tz.conf

Add the following lines into the configs file and save:
[Service]~~ ~~Environment=TZ=America/Los_Angeles

You can issue ls -l /usr/share/zoneinfo/ to list the region names. Then ls -l /usr/share/zoneinfo/INPUT_REGION_HERE/ to list all the timezone names for the specified region.


#3

##This is the most up to date and simplest solution to fix the issue with the wrong time shown in Embedded PMP’s UI

  1. SSH into your embedded PMP machine.
  2. Type ls -l /usr/share/zoneinfo to list the region names and find YOUR_REGION_NAME.
  3. Type ls -l /usr/share/zoneinfo/YOUR_REGION_NAME/ to find YOUR_TIMEZONE_NAME for your region.
  4. Type echo 'systemctl set-environment TZ=YOUR_REGION_NAME/YOUR_TIMEZONE_NAME' >> .config/autostart.sh