From 180ab874731db52d7a5e1bd5e34e4e9f023f1547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Fri, 15 Mar 2019 01:08:12 +0100 Subject: [PATCH] Datetime fix --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 32eef45..cb88851 100644 --- a/README.md +++ b/README.md @@ -472,8 +472,8 @@ import pytz
= datetime(year, month, day, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, fold=0) = timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0) ``` -* **`'fold=1'` means second pass in case of time jumping back for one hour.** * **Use `'.weekday()'` to get day of the week (Mon == 0).** +* **`'fold=1'` means second pass in case of time jumping back for one hour.** ### Now ```python @@ -486,7 +486,7 @@ import pytz ### Encode ```python = D/T/DT.fromisoformat() # From 'YYYY-MM-DD', 'HH:MM:SS.ffffff[+]' or both. -
= DT.strptime(, '') # Datetime from string according to 'format'. +
= DT.strptime(, '') # Datetime from string according to . = D/DT.fromordinal() # Date or datetime from days since Christ. = D/DT.fromtimestamp() # Date or datetime from seconds since Epoch in local time. = DT.utcfromtimestamp() # Naive datetime from seconds since Epoch in UTC time.