nat.tool.datetime_tools#
Classes#
Simple tool which returns the current date and time in human readable format with timezone information. By default, |
|
Simple tool which returns the name of the current timezone. |
Functions#
|
|
|
|
|
|
|
|
|
Module Contents#
- class CurrentTimeToolConfig#
Bases:
nat.data_models.function.FunctionBaseConfigSimple tool which returns the current date and time in human readable format with timezone information. By default, the timezone is in Etc/UTC. If the user provides a timezone in the header, we will use it. Timezone will be provided in IANA zone name format. For example, “America/New_York” or “Etc/UTC”.
- class CurrentTimeZoneToolConfig#
Bases:
nat.data_models.function.FunctionBaseConfigSimple tool which returns the name of the current timezone.
- _get_timezone_from_headers(
- headers: starlette.datastructures.Headers | None,
- _get_system_timezone(
- fallback_tz: str = 'Etc/UTC',
- _get_timezone_obj(
- headers: starlette.datastructures.Headers | None,
- async current_datetime(
- _config: CurrentTimeToolConfig,
- _builder: nat.builder.builder.Builder,
- async current_timezone(
- _config: CurrentTimeZoneToolConfig,
- _builder: nat.builder.builder.Builder,