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

Ability to set timezone #8

@DavisNT

Description

@DavisNT

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions