Skip to main content
Version: Python

dh_now

dh_now provides the current datetime as an Instant.

info

In query strings, users should choose the built-in function now instead of dh_now. For more information, see:

Syntax

dh_now(
system: bool = false,
resolution: str = 'ns',
) -> Instant

Parameters

ParameterTypeDescription
system optionalbool

True to use the system clock; False to use the default clock. Under most circumstances, the default clock will return the current system time, but during replay simulations, the default clock can return the replay time. The default is False.

resolution optionalstr

The resolution of the returned time. The default ‘ns’ will return nanosecond resolution times if possible. ‘ms’ will return millisecond resolution times.

Returns

An Instant representation of the current time.

Examples

from deephaven.time import dh_now

print(dh_now())