| Server IP : 61.19.30.66 / Your IP : 216.73.216.15 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python2.7/dist-packages/wadllib/ |
Upload File : |
ó
õï"Oc @ sY d Z d d l Z d d l Z e j d e j ƒ Z d e j f d „ ƒ YZ d „ Z d S( sÓ
Parser for ISO 8601 time strings
================================
>>> d = iso_strptime("2008-01-07T05:30:30.345323+03:00")
>>> d
datetime.datetime(2008, 1, 7, 5, 30, 30, 345323, tzinfo=TimeZone(10800))
>>> d.timetuple()
(2008, 1, 7, 5, 30, 30, 0, 7, 0)
>>> d.utctimetuple()
(2008, 1, 7, 2, 30, 30, 0, 7, 0)
>>> iso_strptime("2008-01-07T05:30:30.345323-03:00")
datetime.datetime(2008, 1, 7, 5, 30, 30, 345323, tzinfo=TimeZone(-10800))
>>> iso_strptime("2008-01-07T05:30:30.345323")
datetime.datetime(2008, 1, 7, 5, 30, 30, 345323)
>>> iso_strptime("2008-01-07T05:30:30")
datetime.datetime(2008, 1, 7, 5, 30, 30)
>>> iso_strptime("2008-01-07T05:30:30+02:00")
datetime.datetime(2008, 1, 7, 5, 30, 30, tzinfo=TimeZone(7200))
iÿÿÿÿNsa ^
# pattern matching date
(?P<year>\d{4})\-(?P<month>\d{2})\-(?P<day>\d{2})
# separator
T
# pattern matching time
(?P<hour>\d{2})\:(?P<minutes>\d{2})\:(?P<seconds>\d{2})
# pattern matching optional microseconds
(\.(?P<microseconds>\d{6}))?
# pattern matching optional timezone offset
(?P<tz_offset>[\-\+]\d{2}\:\d{2})?
$t TimeZonec B s, e Z d „ Z d „ Z d „ Z d „ Z RS( c C sj | j d ƒ j d ƒ \ } } t j d t | ƒ d t | ƒ ƒ | _ | j d ƒ rf | j d 9_ n d S( Ns -+t :t hourst minutest -iÿÿÿÿ( t lstript splitt datetimet timedeltat intt stdoffsett
startswith( t selft tz_stringR R ( ( s8 /usr/lib/python2.7/dist-packages/wadllib/iso_strptime.pyt __init__8 s
c C s$ d | j j d d d | j j S( Ns TimeZone(%s)i i<