%PDF- %PDF-
| Direktori : /proc/self/root/proc/3522530/root/lib/python2.7/site-packages/salt/states/ |
| Current File : //proc/self/root/proc/3522530/root/lib/python2.7/site-packages/salt/states/timezone.pyo |
�
���^c @@ sQ d Z d d l m Z m Z m Z d d l m Z m Z d � Z e d � Z
d S( u.
Management of timezones
=======================
The timezone can be managed for the system:
.. code-block:: yaml
America/Denver:
timezone.system
The system and the hardware clock are not necessarily set to the same time.
By default, the hardware clock is set to localtime, meaning it is set to the
same time as the system clock. If `utc` is set to True, then the hardware clock
will be set to UTC, and the system clock will be an offset of that.
.. code-block:: yaml
America/Denver:
timezone.system:
- utc: True
.. _here: https://help.ubuntu.com/community/UbuntuTime#Multiple_Boot_Systems_Time_Conflicts
The Ubuntu community documentation contains an explanation of this setting, as
it applies to systems that dual-boot with Windows. This is explained in greater
detail here_.
i ( t absolute_importt print_functiont unicode_literals( t SaltInvocationErrort CommandExecutionErrorc C@ s
d t k S( uC
Only load if the timezone module is available in __salt__
u timezone.get_zone( t __salt__( ( ( s8 /usr/lib/python2.7/site-packages/salt/states/timezone.pyt __virtual__$ s c
C@ s� i | d 6i d 6d d 6d d 6} t } t } y t d | � } Wn: t t f k
r~ } t | d <d j | | � | d <| SXt } g } t d � d k r� t } n | t k r� t | d <| j d
j | � � n t } | r| | k rd | d <t } n+ | r,| | k r,| j d j | � � n | d t k rSd j | � | d <| St d
r�g } | t k r�| j d j | � � n | r�| | k r�| j d j | � � n d j | � | d <| Sg } | r1t d | � r| | d d <| j d j | � � t | d <q1| j d � t | d <n | r�d } | rLd } n t d | � r�| | d d <| j d j | � � t | d <q�| j d j | � � t | d <n d j | � | d <| S( u�
Set the timezone for the system.
name
The name of the timezone to use (e.g.: America/Denver)
utc
Whether or not to set the hardware clock to UTC (default is True)
u nameu changesu resultu u commentu timezone.zone_compareu@ Unable to compare desired timezone '{0}' to system timezone: {1}u timezone.get_hwclocku localtimeu Timezone {0} already setu UTC already set to {0}u , u testu Timezone {0} needs to be setu UTC needs to be set to {0}u timezone.set_zoneu timezoneu Set timezone {0}u Failed to set timezoneu UTCu timezone.set_hwclocku utcu Set UTC to {0}u Failed to set UTC to {0}N(
t Nonet FalseR R R t formatt Truet appendt joint __opts__(
t namet utct rett do_utct do_zonet compzonet exct myutct messagest clock( ( s8 /usr/lib/python2.7/site-packages/salt/states/timezone.pyt system+ sr
N( t __doc__t
__future__R R R t salt.exceptionsR R R R
R ( ( ( s8 /usr/lib/python2.7/site-packages/salt/states/timezone.pyt <module> s