Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Ability to set timezone #8

Open
DavisNT opened this issue Apr 11, 2015 · 0 comments
Open

Ability to set timezone #8

DavisNT opened this issue Apr 11, 2015 · 0 comments

Comments

@DavisNT
Copy link
Contributor

DavisNT commented Apr 11, 2015

Purpose

This is required by Mopidy-AlarmClock integration (pimusicbox/pimusicbox#270).

Proposed solution

In web interface

  • Take list of timezones from folder /usr/share/zoneinfo/ (may be there is better way to get list of timezones from OS)
  • Store selected timezone in .ini file

In /opt/musicbox/startup.sh

  • Read selected timezone from .ini file
  • Ensure that /usr/share/zoneinfo/$TIMEZONE is a file
  • echo $TIMEZONE > /etc/timezone
  • rm -f /etc/localtime
  • cp /usr/share/zoneinfo/$TIMEZONE /etc/localtime

The code snippet is untested.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant