()
return timezones
load list of timezones that the system is aware of
load list of timezones that the system is aware of
load list of timezones that the system is aware of
def _get_timezones():
        """ load list of timezones that the system is aware of """

        timezones_tab = '/usr/share/zoneinfo/zone.tab'
        if not os.path.exists(timezones_tab):
            timezones_tab = '/usr/share/lib/zoneinfo/tab/zone_sun.tab'

        if not os.path.exists(timezones_tab):
            return []

        timezones = subprocess.check_output(
            ['/usr/bin/awk', '!/#/ {print $3}', timezones_tab])
        timezones = sorted(timezones.decode('utf-8').strip('\n').split('\n'))

        # https://github.com/simonwiles/cinnamon_applets/issues/7
        timezones.append('UTC')

        return timezones
def _get_timezones ( ) : timezones_tab = '/usr/share/zoneinfo/zone.tab' if not os . path . exists ( timezones_tab ) : timezones_tab = '/usr/share/lib/zoneinfo/tab/zone_sun.tab' if not os . path . exists ( timezones_tab ) : return [ ] timezones = subprocess . check_output ( [ '/usr/bin/awk' , '!/#/ {print $3}' , timezones_tab ] ) timezones = sorted ( timezones . decode ( 'utf-8' ) . strip ( '\n' ) . split ( '\n' ) ) # https://github.com/simonwiles/cinnamon_applets/issues/7 timezones . append ( 'UTC' ) return timezones