About DateTime Tools for Langflow
DateTime Tools for Langflow is a custom component for date and time operations with timezone support. It is intended for Langflow users who need the current time or week number in a specified timezone, with basic handling for invalid timezone names.
Key features
- 01Get current date and time by timezone
- 02Get week number by timezone
- 03Handle invalid timezone names
Use cases
- 01Check the current time in a specified timezone
- 02Find the week number for a timezone
MCP support
The README describes a Langflow custom component and does not specify an MCP integration or capabilities.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEDateTime Tools for Langflow
A simple custom component for Langflow that provides datetime-related tools with timezone support.
Features
- Get current date and time with timezone support
- Get current week number with timezone support
- Simple error handling for invalid timezones
Installation
- Copy the contents of
langflow_component.py - Open Langflow
- Click "+ Custom Component"
- Paste the code into the editor
- Click "Check & Save"
Usage
Get Current DateTime
datetime_tools = DateTimeTools()
current_time = datetime_tools.get_current_datetime("America/New_York")
# Returns: "2024-03-20T10:30:00-04:00"
Get Week Number
datetime_tools = DateTimeTools()
week_num = datetime_tools.get_week_number("America/New_York")
# Returns: 12
Timezone Support
The component supports all timezones available in the IANA Time Zone Database. Common timezone identifiers include:
- UTC
- America/New_York
- America/Los_Angeles
- Europe/London
- Asia/Tokyo
- Australia/Sydney
For a complete list of supported timezones, refer to the IANA Time Zone Database.
Error Handling
- Invalid timezones will return an error message
- Week number will return -1 for invalid timezones or errors
Dependencies
The component requires the following Python packages:
- pytz
- datetime (built-in)
Make sure these are installed in your Langflow environment.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.