Skip to content

Commit 66fffae

Browse files
committed
Switched pytz for dateutil in datetime.
1 parent 64a38fc commit 66fffae

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,8 @@ Datetime
461461
* **If object is naive it is presumed to be in system's timezone.**
462462

463463
```python
464-
# $ pip3 install pytz
465464
from datetime import date, time, datetime, timedelta
466-
import pytz
465+
from dateutil.tz import UTC, gettz
467466
```
468467

469468
### Constructors
@@ -486,8 +485,8 @@ import pytz
486485

487486
### Timezone
488487
```python
489-
<tz> = pytz.utc # UTC timezone.
490-
<tz> = pytz.timezone('<Cont.>/<City>') # Timezone from 'Continent/City_Name' str.
488+
<tz> = UTC # UTC timezone.
489+
<tz> = gettz('<Cont.>/<City>') # Timezone from 'Continent/City_Name' str.
491490
<DTa> = <DT>.astimezone(<tz>) # Datetime, converted to passed timezone.
492491
<Ta/DTa> = <T/DT>.replace(tzinfo=<tz>) # Unconverted object with new timezone.
493492
```

0 commit comments

Comments
 (0)