crossbario / crossbar

Crossbar.io - WAMP application router
https://crossbar.io/
Other
2.05k stars 274 forks source link

fix cookiestore.py utc #1912

Closed antonymott closed 2 years ago

antonymott commented 2 years ago

match utc creation method in _create() and _clean_cookie_file()

oberstet commented 2 years ago

no, the format must be ISO 8601, and the current code is correct

https://github.com/crossbario/autobahn-python/blob/9de497273c6db50d8697019844f6a7fd3a867789/autobahn/util.py#L166

(cpy39_1) oberstet@intel-nuci7:~$ python
Python 3.9.4 (default, Apr 29 2021, 02:30:43) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.timezone
<class 'datetime.timezone'>
>>> datetime.timezone.utc
datetime.timezone.utc
>>> datetime.datetime.now(datetime.timezone.utc)
datetime.datetime(2021, 11, 22, 8, 32, 52, 286101, tzinfo=datetime.timezone.utc)
>>> str(datetime.datetime.now(datetime.timezone.utc))
'2021-11-22 08:33:07.006501+00:00'
>>> from autobahn import util
>>> util.utcnow()
'2021-11-22T08:33:30.639Z'
>>>