mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(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
This commit is contained in:
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…
Reference in New Issue
Block a user