Skip to content

Commit d5e8f12

Browse files
committed
Datetime fix
1 parent 91b5548 commit d5e8f12

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -512,17 +512,14 @@ import pytz
512512

513513
### Format
514514
```python
515-
>>> dt = datetime.strptime('2015-05-14 23:39:00', '%Y-%m-%d %H:%M:%S')
516-
>>> dt.strftime("%dth %B '%y %A %I%p")
517-
"14th May '15 Thursday 11PM"
515+
>>> dt = datetime.strptime('2015-05-14 23:39:00.00 +0200', '%Y-%m-%d %H:%M:%S.%f %z')
516+
>>> dt.strftime("%A %dth %B '%y, %I:%m%p %Z")
517+
"Thursday 14th May '15, 11:05PM UTC+02:00"
518518
```
519519

520520
#### Rest of the codes:
521521
* **`'b'` - Month, abbreviated name.**
522522
* **`'a'` - Weekday, abbreviated name.**
523-
* **`'f'` - Microseconds, 6 digits.**
524-
* **`'z'` - Timezone offset, ± and 4 digits.**
525-
* **`'Z'` - Timezone name.**
526523

527524

528525
Arguments

0 commit comments

Comments
 (0)