HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/samba/netcmd/__pycache__/nettime.cpython-310.pyc
o

�/a��@sDddlmZddlmZddlmZddlmZGdd�de�Z	dS)�N�)�common)�Net)�Commandc@s:eZdZdZdZejejejd�Z	dgZ
		ddd�ZdS)	�cmd_timea�Retrieve the time on a server.

This command returns the date and time of the Active Directory server specified on the command.  The server name specified may be the local server or a remote server.  If the servername is not specified, the command returns the time and date of the local AD server.

Example1:
samba-tool time samdom.example.com

Example1 returns the date and time of the server samdom.example.com.

Example2:
samba-tool time

Example2 return the date and time of the local server.
z%prog [server-name] [options])�	sambaopts�credopts�versionoptszserver_name?NcCsR|��}|j|dd�}t|||jd�}|durt�|�}|j�|�|�d�dS)NT)�fallback_machine)�server�
)	�get_loadparm�get_credentialsr�	ipaddressr�netcmd_dnsname�outf�write�time)�self�server_namerrr	�lp�creds�net�r�6/usr/lib/python3/dist-packages/samba/netcmd/nettime.py�run5s
zcmd_time.run)NNNN)�__name__�
__module__�__qualname__�__doc__�synopsis�options�SambaOptions�CredentialsOptions�VersionOptions�takes_optiongroups�
takes_argsrrrrrrs��r)
�samba.getopt�getoptr!�r�	samba.netr�samba.netcmdrrrrrr�<module>s