File: //kunden/lib/python3/dist-packages/fastimport/__pycache__/dates.cpython-39.pyc
a
�+yWh � @ sN d Z ddlZddlmZ d
dd�Zdd� Zddd �Zdd
d�Zeeed�ZdS )z�Date parsing routines.
Each routine represents a date format that can be specified in a
stream using the date-format feature. The return value is
timestamp,timezone where
* timestamp is seconds since epoch
* timezone is the offset from UTC in seconds.
� N)�errorsc C sL | � dd�\}}t|�}zt|�}W n tyB t�||��Y n0 ||fS )z�Parse a date from a raw string.
The format must be exactly "seconds-since-epoch offset-utc".
See the spec for details.
� � )�split�float�parse_tz�
ValueErrorr ZInvalidTimezone)�s�linenoZ
timestamp_strZtimezone_strZ timestamp�timezone� r �2/usr/lib/python3/dist-packages/fastimport/dates.py� parse_raw s r c C s^ | dd� }|dvrt | ��ddd�| }t| dd� �}t| dd� �}|d d| | S )zjParse a timezone specification in the [+|-]HHMM format.
:return: the timezone offset in seconds.
r r )� +� -������N�<