Skip to content

Commit

Permalink
docs: update CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bednar committed Apr 29, 2021
1 parent e7420c9 commit 44094c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### Features
1. [#203](https://github.com/influxdata/influxdb-client-python/issues/219): Bind query parameters
1. [#225](https://github.com/influxdata/influxdb-client-python/pull/225): Exponential random backoff retry strategy
1. [#238](https://github.com/influxdata/influxdb-client-python/pull/238): Add possibility to specify default `timezone` for datetimes without `tzinfo`

### Bug Fixes
1. [#222](https://github.com/influxdata/influxdb-client-python/pull/222): Pass configured timeout to HTTP client
Expand Down
11 changes: 3 additions & 8 deletions tests/test_DateHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,17 @@

from pytz import UTC, timezone

from influxdb_client.client.util import date_utils
from influxdb_client.client.util.date_utils import DateHelper, get_date_helper
from influxdb_client.client.util.date_utils import DateHelper


class DateHelperTest(unittest.TestCase):

def setUp(self) -> None:
date_utils.date_helper = DateHelper()

def test_to_utc(self):
date = get_date_helper().to_utc(datetime(2021, 4, 29, 20, 30, 10, 0))
date = DateHelper().to_utc(datetime(2021, 4, 29, 20, 30, 10, 0))
self.assertEqual(datetime(2021, 4, 29, 20, 30, 10, 0, UTC), date)

def test_to_utc_different_timezone(self):
date_utils.date_helper = DateHelper(timezone=timezone('ETC/GMT+2'))
date = get_date_helper().to_utc(datetime(2021, 4, 29, 20, 30, 10, 0))
date = DateHelper(timezone=timezone('ETC/GMT+2')).to_utc(datetime(2021, 4, 29, 20, 30, 10, 0))
self.assertEqual(datetime(2021, 4, 29, 22, 30, 10, 0, UTC), date)


Expand Down

0 comments on commit 44094c0

Please sign in to comment.