Skip to content

Commit

Permalink
Fix date
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxudo committed Sep 26, 2023
1 parent a03d1d1 commit 5708e30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/displays.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ def flatten_displays_info(array, localization):
if str(obj['_spdisplays_display-year']) != "0":
display['manufactured'] = str(obj['_spdisplays_display-year']) + ' Model'
else:
display['manufactured'] = datetime.datetime.strptime(obj['_spdisplays_display-year'] + '-' + obj['_spdisplays_display-week'] + "-" + str(1) , "%Y-%W-%w")
mfg_date = datetime.datetime.strptime(obj['_spdisplays_display-year'] + '-' + obj['_spdisplays_display-week'] + "-" + str(1) , "%Y-%W-%w")
display['manufactured'] = str(mfg_date.year) + "-" + str(mfg_date.month)

# Check for Apple Studio Display
if 'model' in display and display['model'] == "Studio Display" and 'vendor' in display and display['vendor'] == "610":
Expand Down

0 comments on commit 5708e30

Please sign in to comment.