Function
server_datetime
(sqlexecute: SQLExecute, quoted: bool = False)
Source from the content-addressed store, hash-verified
| 21 | |
| 22 | |
| 23 | def server_datetime(sqlexecute: SQLExecute, quoted: bool = False) -> str: |
| 24 | server_datetime_str = sqlexecute.now().strftime('%Y-%m-%d %H:%M:%S') |
| 25 | if quoted: |
| 26 | return f"'{server_datetime_str}'" |
| 27 | else: |
| 28 | return server_datetime_str |
| 29 | |
| 30 | |
| 31 | # todo: maybe these handlers belong in a repl_handlers.py (which does not exist yet) |
Callers
nothing calls this directly
Tested by
no test coverage detected