fox-it / flow.record

Recordization library
GNU Affero General Public License v3.0
7 stars 9 forks source link

Make datetime fieldtypes timezone aware #78

Closed yunzheng closed 1 year ago

yunzheng commented 1 year ago

This PR will add the following:

Note that comparing to naive datetime objects will now break and is also in line with default Python behaviour

To ensure uniform datetime field output they are always displayed in UTC To disable this behaviour you can set the environment variable FLOW_RECORD_TZ=NONE

codecov[bot] commented 1 year ago

Codecov Report

Merging #78 (796f150) into main (464914e) will increase coverage by 0.18%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
+ Coverage   78.86%   79.04%   +0.18%     
==========================================
  Files          32       32              
  Lines        2862     2878      +16     
==========================================
+ Hits         2257     2275      +18     
+ Misses        605      603       -2     
Flag Coverage Δ
unittests 79.04% <100.00%> (+0.18%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
flow/record/adapter/elastic.py 0.00% <ø> (ø)
flow/record/base.py 90.30% <100.00%> (+0.01%) :arrow_up:
flow/record/fieldtypes/__init__.py 92.10% <100.00%> (+0.76%) :arrow_up:
flow/record/jsonpacker.py 91.25% <100.00%> (ø)
flow/record/packer.py 95.28% <100.00%> (+0.04%) :arrow_up:
flow/record/stream.py 94.87% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more