
    hl                     .    d Z ddlmZmZ ddlZd Zd ZdS )zParse RFC3339 date strings    )datetimetimezoneNc                 D    t          |                                           S )a  Parse an RFC3339 date string and return the number of seconds since the
    epoch (as a float).

    In particular, this method is meant to parse the strings returned by the
    JSON mapping of protobuf google.protobuf.timestamp.Timestamp instances:
    https://github.com/protocolbuffers/protobuf/blob/4cf5bfee9546101d98754d23ff378ff718ba8438/src/google/protobuf/timestamp.proto#L99

    This method has microsecond precision; nanoseconds will be truncated.

    Args:
        datestr: A string in RFC3339 format.
    Returns:
        Float: The number of seconds since the Unix epoch.
    Raises:
        ValueError: Raised if the `datestr` is not a valid RFC3339 date string.
    )_parse_to_datetime	timestamp)datestrs    [/var/www/html/e360mart/e360mart_env/lib/python3.11/site-packages/firebase_admin/_rfc3339.pyparse_to_epochr
      s    " g&&00222    c                 (   t          j        dd|           }	 t          j        |d                              t
          j                  S # t          $ r Y nw xY w	 t          j        |d                              t
          j                  S # t          $ r Y nw xY wt          j        dd|          }	 t          j        |d          S # t          $ r Y nw xY w	 t          j        |d	          S # t          $ r Y nw xY wt          d
|  d          )a5  Parse an RFC3339 date string and return a python datetime instance.

    Args:
        datestr: A string in RFC3339 format.
    Returns:
        datetime: The corresponding `datetime` (with timezone information).
    Raises:
        ValueError: Raised if the `datestr` is not a valid RFC3339 date string.
    z(\.\d{6})\d*z\1z%Y-%m-%dT%H:%M:%S.%fZ)tzinfoz%Y-%m-%dT%H:%M:%SZz(\d\d):(\d\d)$z\1\2z%Y-%m-%dT%H:%M:%S.%f%zz%Y-%m-%dT%H:%M:%S%zz
time data z does not match RFC3339 format)resubr   strptimereplacer   utc
ValueError)r   datestr_modifieds     r	   r   r   (   sf    voug>> 5
 

''
&
&	'     2
 

''
&
&	'     v/:JKK !13KLLL    !13HIII    I'III
J
JJsG   2A 
AA2B 
BB6C 
CCC1 1
C>=C>)__doc__r   r   r   r
   r    r   r	   <module>r      s[    !   ' ' ' ' ' ' ' ' 				3 3 3(/K /K /K /K /Kr   