HEX
Server: Apache
System: Linux infong-uk86 4.4.400-icpu-106 #2 SMP Mon Sep 15 08:23:40 UTC 2025 x86_64
User: u44115835 (4976590)
PHP: 8.4.17
Disabled: NONE
Upload Files
File: //kunden/lib/python3/dist-packages/fastimport/__pycache__/dates.cpython-39.pyc
a

�+yWh	�@sNdZddlZddlmZd
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)�errorscCsL|�dd�\}}t|�}zt|�}WntyBt�||��Yn0||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�
ValueErrorrZInvalidTimezone)�s�linenoZ
timestamp_strZtimezone_strZ	timestamp�timezone�r�2/usr/lib/python3/dist-packages/fastimport/dates.py�	parse_rawsrcCs^|dd�}|dvrt|��ddd�|}t|dd��}t|dd��}|dd||S)zjParse a timezone specification in the [+|-]HHMM format.

    :return: the timezone offset in seconds.
    rr)�+�-������N�<)r�int)ZtzZ	sign_byteZsignZhoursZminutesrrr
r-srcCstt��dS)zGParse a date from a rfc2822 string.

    See the spec for details.
    N)�NotImplementedError�
parse_rfc2822�r	r
rrr
r@srcCst��dfS)zeParse a date from a string.

    The format must be exactly "now".
    See the spec for details.
    r)�timerrrr
�	parse_nowHsr)�rawZrfc2822Znow)r)r)r)	�__doc__rZ
fastimportrrrrrZDATE_PARSERS_BY_NAMErrrr
�<module>s	


�