Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

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

AchillesAchilles Members, Plex Pass, Plex Ninja Posts: 1,714 Plex Ninja
edited 8:13AM in Plex Media Player

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.

Comments

  • AchillesAchilles Members, Plex Pass, Plex Ninja Posts: 1,714 Plex Ninja
    edited 8:16AM

    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
This discussion has been closed.