277. Timezone

Timezone related stuff

277.1. Authors

  • Klaus Kaempf <kkaempf@suse.de>

  • Thomas Roelz <tom@suse.de>

277.2. Summary of Module Globals

List of Global Functions

  • Export - AutoYaST interface function: Return the Timezone configuration as a map.

  • GetCountryForTimezone - Return the country part of language code for given timezone

  • GetDateTime - GetDateTime()

  • GetDateTimeMap - Return current date and time in the map

  • GetLanguageForTimezone - Return the language code for given timezone (by reverse searching the "language -> timezone" map)

  • GetTimezoneCountry - Return translated country name of given timezone

  • GetTimezoneForLanguage - GetTimezoneForLanguage()

  • Import - AutoYaST interface function: Get the Timezone configuration from a map.

  • MakeProposal - Return proposal list of strings.

  • Modified - was anything modified?

  • PopVal - restore the original data from internal map

  • ProposeLocaltime - Return true if localtime should be proposed as default Based on current hardware configuration: Win partitions present or 32bit Mac

  • PushVal - save the initial data

  • Read - Read timezone settings from sysconfig

  • Region - Return list of regions for timezone selection list

  • ResetZonemap - Clear the internal map with timezones, so the timezone data could be retranslated next time when they are needed

  • Save - Save()

  • Selection - Selection()

  • Set - Set()

  • SetTime - Set the new time and date given by user

  • SetTimezoneForLanguage - Set the timezone for the given system language.

  • Summary - AutoYaST interface function: Return the summary of Timezone configuration as a map.

  • SystemTime2HWClock - Set the Hardware Clock to the current System Time.

  • Timezone - Timezone()

  • UpdateTimezone - Convert the duplicated timezone to the only one supported Temporary solution - a result of discussion of bug #47472

  • get_zonemap - get_zonemap()

List of Global Variables

  • modified - if anyuthing was modified (currently for auto client only)

  • windows_partition - If there is windows partition, assume that local time is used

277.3. Global Functions

277.3.1. Export

AutoYaST interface function: Return the Timezone configuration as a map.

Return value

  • map - with the settings

277.3.2. GetCountryForTimezone

Return the country part of language code for given timezone

Function parameters

  • string tz

Return value

  • string

277.3.3. GetDateTime

GetDateTime()

Function parameters

  • boolean real_time

  • boolean locale_format

Return value

  • string - The string output.

277.3.4. GetDateTimeMap

Return current date and time in the map

Return value

  • map

277.3.5. GetLanguageForTimezone

Return the language code for given timezone (by reverse searching the "language -> timezone" map)

Function parameters

  • string tz

Return value

  • string

277.3.6. GetTimezoneCountry

Return translated country name of given timezone

Function parameters

  • string zone

Return value

  • string

277.3.7. GetTimezoneForLanguage

GetTimezoneForLanguage()

Function parameters

  • string sys_language

  • string default_timezone

Return value

  • string - The timezone for this language, e.g. "US/Eastern" or the default value if nothing found.

See also:

  • -

277.3.8. Import

AutoYaST interface function: Get the Timezone configuration from a map.

Function parameters

  • map settings

Return value

  • boolean - success

277.3.9. MakeProposal

Return proposal list of strings.

Function parameters

  • boolean force_reset

  • boolean language_changed

Return value

  • list<string> - user readable description. If force_reset is true reset the module to the timezone stored in default_timezone.

277.3.10. Modified

was anything modified?

Return value

  • boolean

277.3.11. PopVal

restore the original data from internal map

Return value

  • void

277.3.12. ProposeLocaltime

Return true if localtime should be proposed as default Based on current hardware configuration: Win partitions present or 32bit Mac

Return value

  • boolean

277.3.13. PushVal

save the initial data

Return value

  • void

277.3.14. Read

Read timezone settings from sysconfig

Return value

  • void

277.3.15. Region

Return list of regions for timezone selection list

Return value

  • list

277.3.16. ResetZonemap

Clear the internal map with timezones, so the timezone data could be retranslated next time when they are needed

Return value

  • void

277.3.17. Save

Save()

Return value

  • void

277.3.18. Selection

Selection()

Function parameters

  • integer num

Return value

  • list - 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 also:

  • Set()

277.3.19. Set

Set()

Function parameters

  • string zone

  • boolean really

Return value

  • integer - the number of the region that contains the timezone

277.3.20. SetTime

Set the new time and date given by user

Function parameters

  • string year

  • string month

  • string day

  • string hour

  • string minute

  • string second

Return value

  • void

277.3.21. SetTimezoneForLanguage

Set the timezone for the given system language.

Function parameters

  • string sys_language

Return value

  • void - the number of the region that contains the timezone

277.3.22. Summary

AutoYaST interface function: Return the summary of Timezone configuration as a map.

Return value

  • string - summary string (html)

277.3.23. SystemTime2HWClock

Set the Hardware Clock to the current System Time.

Return value

  • void

277.3.24. Timezone

Timezone()

Return value

  • void

See also:

  • Set()

277.3.25. UpdateTimezone

Convert the duplicated timezone to the only one supported Temporary solution - a result of discussion of bug #47472

Function parameters

  • string tmz

Return value

  • string

277.3.26. get_zonemap

get_zonemap()

Return value

  • list<map<string,any> > - timezone DB (map)

See also:

  • get_lang2tz()

277.4. Global Variables

277.4.1. modified

if anyuthing was modified (currently for auto client only)

277.4.2. windows_partition

If there is windows partition, assume that local time is used

277.5. Module Requirements

277.5.1. Module Imports

  • Arch
  • HTML
  • Language
  • Misc
  • Mode
  • ProductFeatures
  • Stage
  • String

277.5.2. Module Includes