Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MBetterc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mbetter
MBetterc
Commits
80a5421b
Commit
80a5421b
authored
Feb 20, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix fixtures API: convert timezone-aware datetime to naive for database comparison
parent
dd10456c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
routes.py
mbetterclient/web_dashboard/routes.py
+13
-4
No files found.
mbetterclient/web_dashboard/routes.py
View file @
80a5421b
...
@@ -10745,11 +10745,20 @@ def get_overlay_fixtures():
...
@@ -10745,11 +10745,20 @@ def get_overlay_fixtures():
logger
.
info
(
f
"[FIXTURES API] today_start_utc: {today_start_utc}, today_end_utc: {today_end_utc}"
)
logger
.
info
(
f
"[FIXTURES API] today_start_utc: {today_start_utc}, today_end_utc: {today_end_utc}"
)
logger
.
info
(
f
"[FIXTURES API] yesterday_start_utc: {yesterday_start_utc}, yesterday_end_utc: {yesterday_end_utc}"
)
logger
.
info
(
f
"[FIXTURES API] yesterday_start_utc: {yesterday_start_utc}, yesterday_end_utc: {yesterday_end_utc}"
)
# Convert timezone-aware datetime to timezone-naive for database comparison
# Database stores start_time without timezone info
today_start_naive
=
today_start_utc
.
replace
(
tzinfo
=
None
)
if
today_start_utc
.
tzinfo
else
today_start_utc
today_end_naive
=
today_end_utc
.
replace
(
tzinfo
=
None
)
if
today_end_utc
.
tzinfo
else
today_end_utc
yesterday_start_naive
=
yesterday_start_utc
.
replace
(
tzinfo
=
None
)
if
yesterday_start_utc
.
tzinfo
else
yesterday_start_utc
yesterday_end_naive
=
yesterday_end_utc
.
replace
(
tzinfo
=
None
)
if
yesterday_end_utc
.
tzinfo
else
yesterday_end_utc
logger
.
info
(
f
"[FIXTURES API] today_start_naive: {today_start_naive}, today_end_naive: {today_end_naive}"
)
# Get active matches for today (non-terminal states) - same as Qt player
# Get active matches for today (non-terminal states) - same as Qt player
today_matches
=
session
.
query
(
MatchModel
)
.
filter
(
today_matches
=
session
.
query
(
MatchModel
)
.
filter
(
MatchModel
.
start_time
.
isnot
(
None
),
MatchModel
.
start_time
.
isnot
(
None
),
MatchModel
.
start_time
>=
today_start_
utc
,
MatchModel
.
start_time
>=
today_start_
naive
,
MatchModel
.
start_time
<
today_end_
utc
,
MatchModel
.
start_time
<
today_end_
naive
,
MatchModel
.
status
.
notin_
([
'done'
,
'end'
,
'cancelled'
,
'failed'
,
'paused'
]),
MatchModel
.
status
.
notin_
([
'done'
,
'end'
,
'cancelled'
,
'failed'
,
'paused'
]),
MatchModel
.
active_status
==
True
MatchModel
.
active_status
==
True
)
.
order_by
(
MatchModel
.
start_time
.
asc
())
.
all
()
)
.
order_by
(
MatchModel
.
start_time
.
asc
())
.
all
()
...
@@ -10759,8 +10768,8 @@ def get_overlay_fixtures():
...
@@ -10759,8 +10768,8 @@ def get_overlay_fixtures():
# Check if there are any incomplete matches from yesterday - same as Qt player
# Check if there are any incomplete matches from yesterday - same as Qt player
yesterday_incomplete_matches
=
session
.
query
(
MatchModel
)
.
filter
(
yesterday_incomplete_matches
=
session
.
query
(
MatchModel
)
.
filter
(
MatchModel
.
start_time
.
isnot
(
None
),
MatchModel
.
start_time
.
isnot
(
None
),
MatchModel
.
start_time
>=
yesterday_start_
utc
,
MatchModel
.
start_time
>=
yesterday_start_
naive
,
MatchModel
.
start_time
<
yesterday_end_
utc
,
MatchModel
.
start_time
<
yesterday_end_
naive
,
MatchModel
.
status
.
notin_
([
'done'
,
'end'
,
'cancelled'
,
'failed'
,
'paused'
]),
MatchModel
.
status
.
notin_
([
'done'
,
'end'
,
'cancelled'
,
'failed'
,
'paused'
]),
MatchModel
.
active_status
==
True
MatchModel
.
active_status
==
True
)
.
order_by
(
MatchModel
.
start_time
.
asc
())
.
all
()
)
.
order_by
(
MatchModel
.
start_time
.
asc
())
.
all
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment