fixed portfolio date not updating bug

This commit is contained in:
Justin 2023-07-11 15:51:32 +08:00 committed by GitHub
parent a39279fee1
commit 58474f8eea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -910,9 +910,9 @@ def savePortfolioSettings():
symbol1 = settings['symbol']
days1 = settings['days']
day_start = datetime.datetime.strptime(str(days1), "%Y-%m-%d")
day_today = datetime.datetime.strptime(datetime.datetime.now(pytz.utc).strftime("%Y-%m-%d"), "%Y-%m-%d")
days1 = str((day_today - day_start).days)
# day_start = datetime.datetime.strptime(str(days1), "%Y-%m-%d")
# day_today = datetime.datetime.strptime(datetime.datetime.now(pytz.utc).strftime("%Y-%m-%d"), "%Y-%m-%d")
# days1 = str((day_today - day_start).days)
portfolio['symbols'][symbol1] = {'shares':shares1, 'day':days1, 'cost':cost1}