(core) Account for timezone in TODAY()

Summary: return NOW(tz=tz).date()

Test Plan: None, curious to see if this fixes test_time_defaults when run near midnight.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3079
pull/115/head
Alex Hall 3 years ago
parent e900f39da3
commit 1ed4ca61ea

@ -467,11 +467,11 @@ def SECOND(time):
return _make_datetime(time).second
def TODAY():
def TODAY(tz=None):
"""
Returns the `date` object for the current date.
"""
return datetime.date.today()
return NOW(tz=tz).date()
_weekday_type_map = {

Loading…
Cancel
Save