fixed bug where wrong weekday is showing for prof weather
This commit is contained in:
parent
474881c2f1
commit
312489e94e
@ -5057,13 +5057,6 @@ class StockTicker():
|
||||
f.close()
|
||||
locations = list(daily_weathers['locations'].keys())
|
||||
|
||||
weekdays = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
months =['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
||||
month = months[int(datetime.now().strftime('%m'))-1]
|
||||
date = str(int(datetime.now().strftime('%d')))
|
||||
|
||||
weekday = weekdays[datetime.today().weekday()]
|
||||
|
||||
for i, location in enumerate(locations):
|
||||
|
||||
try:
|
||||
@ -5093,7 +5086,12 @@ class StockTicker():
|
||||
|
||||
img.paste(location_img, (5,3))
|
||||
x_offset = location_img.size[0] + 8
|
||||
|
||||
|
||||
weekdays = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
months =['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
||||
month = months[int(datetime.now().strftime('%m'))-1]
|
||||
date = str(int(datetime.now().strftime('%d')))
|
||||
weekday = weekdays[datetime.today().weekday()]
|
||||
|
||||
date_img = self.textImage((month + ' ' + date + ',' + weekday).upper(), font)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user