add documentation

This commit is contained in:
Mira Weller
2024-04-30 21:49:58 +02:00
parent 18bebb6d31
commit 00dd1a5b31
3 changed files with 43 additions and 0 deletions
+6
View File
@@ -47,6 +47,12 @@ def time_machine_now_assigned_from_request(request):
def time_machine_now(default=False):
"""
Return the datetime to use as current datetime for checking order restrictions in event
index and checkout flow.
:param default: Value to return if time machine mode is disabled. By default the current datetime is used.
"""
if default is False:
default = now()
return timemachine_now_var.get() or default