golden hour
/opt/saltstack/salt/lib/python3.10/site-packages/tempora/__pycache__
⬆️ Go Up
Upload
File/Folder
Size
Actions
__init__.cpython-310.pyc
19.71 KB
Del
OK
schedule.cpython-310.pyc
7.36 KB
Del
OK
timing.cpython-310.pyc
7.67 KB
Del
OK
utc.cpython-310.pyc
887 B
Del
OK
Edit: schedule.cpython-310.pyc
o �xe� � @ s� d Z ddlZddlZddlZddlZddlZdd� Zdd� ZG dd� dej�ZG d d � d e�Z G dd� de �Z G d d� d�ZG dd� de�ZG dd� de�Z dS )a� Classes for calling functions a schedule. Has time zone support. For example, to run a job at 08:00 every morning in 'Asia/Calcutta': >>> job = lambda: print("time is now", datetime.datetime()) >>> time = datetime.time(8, tzinfo=pytz.timezone('Asia/Calcutta')) >>> cmd = PeriodicCommandFixedDelay.daily_at(time, job) >>> sched = InvokeScheduler() >>> sched.add(cmd) >>> while True: # doctest: +SKIP ... sched.run_pending() ... time.sleep(.1) � Nc C s t j �� jtjd�S )u� Provide the current timezone-aware datetime. A client may override this function to change the default behavior, such as to use local time or timezone-naïve times. ��tzinfo)�datetime�utcnow�replace�pytz�utc� r r �D/opt/saltstack/salt/lib/python3.10/site-packages/tempora/schedule.py�now s r c C s t j �| �jtjd�S )u� Convert a numeric timestamp to a timezone-aware datetime. A client may override this function to change the default behavior, such as to use local time or timezone-naïve times. r )r �utcfromtimestampr r r )�tsr r r �from_timestamp"