We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/abhi12299/date-time-tools'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
current_datetime_tz.js•474 B
import { DateTime } from "luxon";
import { DATE_FORMAT } from "../constants.js";
/**
* Get the current date time and timezone
* @returns {string} - The current date time and timezone
*/
export const currentDateTimeAndTz = () => {
const zonedDateTime = DateTime.now();
const dateTime = zonedDateTime.toFormat(DATE_FORMAT);
const timezone = zonedDateTime.zoneName;
const weekday = zonedDateTime.weekdayLong;
return `${dateTime}, ${weekday} in ${timezone}`;
};