salt.modules.timezone

Module for managing timezone on posix-like systems.

salt.modules.timezone.get_hwclock()

Get current hardware clock setting (UTC or localtime)

CLI Example:

salt '*' timezone.get_hwclock
salt.modules.timezone.get_offset()

Get current numeric timezone offset from UCT (i.e. -0700)

CLI Example:

salt '*' timezone.get_offset
salt.modules.timezone.get_zone()

Get current timezone (i.e. America/Denver)

CLI Example:

salt '*' timezone.get_zone
salt.modules.timezone.get_zonecode()

Get current timezone (i.e. PST, MDT, etc)

CLI Example:

salt '*' timezone.get_zonecode
salt.modules.timezone.set_hwclock(clock)

Sets the hardware clock to be either UTC or localtime

CLI Example:

salt '*' timezone.set_hwclock UTC
salt.modules.timezone.set_zone(timezone)

Unlinks, then symlinks /etc/localtime to the set timezone

CLI Example:

salt '*' timezone.set_zone 'America/Denver'

Parent topic

Previous topic

salt.modules.test

Next topic

salt.modules.tls