fixing output
This commit is contained in:
1 parent
9e799049a7
commit
2698fe7114
4 files changed
+234
-62
No files matched your search
@@ -45,7 +45,10 @@ def _seed(con):
|
||||
from datetime import date
|
||||
PHT = timezone(timedelta(hours=8))
|
||||
now_pht = datetime.now(PHT)
|
||||
days_since_sunday = (now_pht.weekday() + 1) % 7
|
||||
wd = now_pht.weekday()
|
||||
days_since_sunday = (wd + 1) % 7
|
||||
if wd == 6:
|
||||
days_since_sunday = 7
|
||||
current_sunday = (now_pht - timedelta(days=days_since_sunday)).date()
|
||||
prev_sunday = current_sunday - timedelta(weeks=1)
|
||||
prev_saturday = prev_sunday + timedelta(days=6)
|
||||
|
||||
Reference in new issue
Block a user