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()
|
f.close()
|
||||||
locations = list(daily_weathers['locations'].keys())
|
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):
|
for i, location in enumerate(locations):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -5094,6 +5087,11 @@ class StockTicker():
|
|||||||
img.paste(location_img, (5,3))
|
img.paste(location_img, (5,3))
|
||||||
x_offset = location_img.size[0] + 8
|
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)
|
date_img = self.textImage((month + ' ' + date + ',' + weekday).upper(), font)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user