Skip to main content
Glama

DataWorks MCP Server

by aliyun
convertTimestamps.ts736 B
import dayjs from 'dayjs'; import { OpenApiClientInstance } from "../../openApiClient/index.js"; export default async function convertTimestamps( agent: OpenApiClientInstance, timestamps?: number[], format?: string, ) { try { const result: string[] = []; if (timestamps) { if (format) { timestamps?.forEach?.((timestamp) => { try { const date = new Date(timestamp); const display = dayjs(date).format(format || 'YYYY-MM-DD'); result.push(display); } catch (e) { console.error(e); } }); }; } return result; } catch (error: any) { throw new Error(`Convert timestamps failed: ${error.message}`); } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aliyun/alibabacloud-dataworks-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server