RaspiPass icon indicating copy to clipboard operation
RaspiPass copied to clipboard

Need to be able to set timezone/locale from within WebGUI

Open Pinchie opened this issue 8 years ago • 3 comments

According to this link it can be done using the --frontend=noninteractive parameter on dpkg-reconfigure command

To implement I will need to:

  1. Gather a list of locales (/usr/share/zoneinfo for areas; /user/share/zoneinfo/[area] for specific zone)
  2. Allow one to be selected from a drop-down within the Web GUI (probably two drop-downs.. one for area, one for zones populated from selected area)
  3. Create a symbolic link /etc/localtime linking to the /usr/share/zoneinfo/[area]/[zone] file
  4. Run dpkg-reconfigure --frontend=noninteractive tzdata

Method:

  1. Create new tab ("system config"? rename "configuration" to "RaspiPass config")
  2. Store directory listing under /usr/share/zoneinfo as array of areas/zones
  3. Populate drop-down boxes with areas
  4. When area is selected, populate second drop-down with zones
  5. Run dpkg-reconfigure as above

Pinchie avatar Nov 14 '16 03:11 Pinchie

Added backend retrieval of directories under /usr/share/zoneinfo, and files within those directories. These are added to an array for selection from a (yet-to-be-added) drop-down. Externally called from html/scripts/locales.php

Currently testing on working branch

Pinchie avatar Apr 16 '17 05:04 Pinchie

Added drop-down and call to external script - just need to write the script to set timezone now

EDIT: Script written

Pinchie avatar Apr 16 '17 08:04 Pinchie

Written and in testing on working tree

Pinchie avatar Apr 16 '17 10:04 Pinchie