return time in filter dates, adjusted using day_start from general config, update playerstats to use this
This commit is contained in:
parent
a478331988
commit
e87e6294c8
|
@ -884,12 +884,13 @@ class Filters(threading.Thread):
|
||||||
s2 = strptime(t2, "%Y-%m-%d")
|
s2 = strptime(t2, "%Y-%m-%d")
|
||||||
e1 = mktime(s1) + offset # s1 is localtime, but returned time since epoch is UTC, then add the
|
e1 = mktime(s1) + offset # s1 is localtime, but returned time since epoch is UTC, then add the
|
||||||
e2 = mktime(s2) + offset # s2 is localtime, but returned time since epoch is UTC
|
e2 = mktime(s2) + offset # s2 is localtime, but returned time since epoch is UTC
|
||||||
|
e2 = e2 + 24 * 3600 - 1 # date test is inclusive, so add 23h 59m 59s to e2
|
||||||
|
|
||||||
adj_t1 = strftime("%Y-%m-%d %H:%M:%S", gmtime(e1)) # make adjusted string including time
|
adj_t1 = strftime("%Y-%m-%d %H:%M:%S", gmtime(e1)) # make adjusted string including time
|
||||||
adj_t1 = strftime("%Y-%m-%d %H:%M:%S", gmtime(e1))
|
adj_t2 = strftime("%Y-%m-%d %H:%M:%S", gmtime(e2))
|
||||||
log.info("t1="+t1+" adj_t1="+adj_t1+'.')
|
log.info("t1="+t1+" adj_t1="+adj_t1+'.')
|
||||||
|
|
||||||
return (t1, t2)
|
return (adj_t1, adj_t2)
|
||||||
|
|
||||||
def __get_date(self, widget, calendar, entry, win):
|
def __get_date(self, widget, calendar, entry, win):
|
||||||
# year and day are correct, month is 0..11
|
# year and day are correct, month is 0..11
|
||||||
|
|
|
@ -1921,7 +1921,7 @@ class Sql:
|
||||||
and h.seats <seats_test>
|
and h.seats <seats_test>
|
||||||
<flagtest>
|
<flagtest>
|
||||||
<gtbigBlind_test>
|
<gtbigBlind_test>
|
||||||
and date_format(h.handStart, '%Y-%m-%d') <datestest>
|
and date_format(h.handStart, '%Y-%m-%d %T') <datestest>
|
||||||
group by hgameTypeId
|
group by hgameTypeId
|
||||||
,pname
|
,pname
|
||||||
,gt.base
|
,gt.base
|
||||||
|
@ -2006,7 +2006,7 @@ class Sql:
|
||||||
and h.seats <seats_test>
|
and h.seats <seats_test>
|
||||||
<flagtest>
|
<flagtest>
|
||||||
<gtbigBlind_test>
|
<gtbigBlind_test>
|
||||||
and to_char(h.handStart, 'YYYY-MM-DD') <datestest>
|
and to_char(h.handStart, 'YYYY-MM-DD HH24:MI:SS') <datestest>
|
||||||
group by hgameTypeId
|
group by hgameTypeId
|
||||||
,pname
|
,pname
|
||||||
,gt.base
|
,gt.base
|
||||||
|
@ -2092,7 +2092,7 @@ class Sql:
|
||||||
and h.seats <seats_test>
|
and h.seats <seats_test>
|
||||||
<flagtest>
|
<flagtest>
|
||||||
<gtbigBlind_test>
|
<gtbigBlind_test>
|
||||||
and date(h.handStart) <datestest>
|
and datetime(h.handStart) <datestest>
|
||||||
group by hgameTypeId
|
group by hgameTypeId
|
||||||
,hp.playerId
|
,hp.playerId
|
||||||
,gt.base
|
,gt.base
|
||||||
|
|
Loading…
Reference in New Issue
Block a user