YaST2 Developers Documentation: Country settings



functions
files
intro

Country settings

modules/Timezone.ycp
Timezone related stuff

Imports

  • Arch
  • Language
  • Misc
  • Mode
  • ProductFeatures
  • Storage
  • String

Global Functions

global Set (string zone, boolean really) -> integer

Set() Set system to selected timezone.

Parameters:
zone
really
Return value:
the number of the region that contains the timezone

global Timezone () -> void

Timezone() The module constructor. Sets the proprietary module data defined globally for public access. This is done only once (and automatically) when the module is loaded for the first time. Calls Set() in initial mode. Reads current timezone from sysconfig in normal mode. @param -

Return value:
-
See:
Set()

global GetTimezoneForLanguage (string sys_language, string default_language) -> string

GetTimezoneForLanguage() Get the timezone for the given system language.

Parameters:
sys_language
default_language
Return value:
The timezone for this language, e.g. "english-us" or the default value if nothing found.
See:
-

global GetDateTime (boolean real_time) -> string

GetDateTime() Get the output of /bin/date "+%H:%M:%S - %Y-%m-%d"

Parameters:
real_time
Return value:
The string output.
See:
-

global MakeProposal (boolean force_reset, boolean language_changed) -> string

MakeProposal() Return proposal string and set system timezone.

Parameters:
force_reset
language_changed
Return value:
user readable description. If force_reset is true reset the module to the timezone stored in default_timezone.

global Selection (integer num) -> list

Selection() Return a map of ids and names to build up a selection list for the user. The key is used later in the Set function to select this timezone. The name is a translated string. @param -

Parameters:
num
Return value:
map for timezones 'timezone_id' is used internally in Set and Probe functions. 'timezone_name' is a user-readable string. Uses Language::language for translation.
See:
Set()

global Save () -> void

Save() Save timezone to target sysconfig. @param -

Return value:
-

YaST2 Developers Documentation