{
  "schemaVersion": "1.0",
  "item": {
    "slug": "cst-time",
    "name": "Cst Time",
    "source": "tencent",
    "type": "skill",
    "category": "通讯协作",
    "sourceUrl": "https://clawhub.ai/xuanpass/cst-time",
    "canonicalUrl": "https://clawhub.ai/xuanpass/cst-time",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/cst-time",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=cst-time",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "run.sh"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/cst-time"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/cst-time",
    "agentPageUrl": "https://openagent3.xyz/skills/cst-time/agent",
    "manifestUrl": "https://openagent3.xyz/skills/cst-time/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/cst-time/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Overview",
        "body": "This skill provides comprehensive guidance for obtaining and working with China Standard Time (CST), which is UTC+8 and used throughout mainland China. It covers various methods for getting local CST time, time zone conversions, and integration with different programming languages and systems."
      },
      {
        "title": "Purpose",
        "body": "CST Time skill helps in:\n\nGetting current CST time from local system\nConverting between different time zones and CST\nIntegrating CST time handling in applications\nScheduling tasks based on CST\nDisplaying and formatting CST time correctly\nHandling daylight saving time considerations (CST doesn't observe DST)"
      },
      {
        "title": "CST Time Zone Information",
        "body": "Time Zone Details:\n\nName: China Standard Time (CST)\nUTC Offset: UTC+8\nDaylight Saving Time: Not observed\nRegion: Mainland China\nIANA Time Zone ID: Asia/Shanghai\n\nImportant Notes:\n\nCST is 8 hours ahead of Coordinated Universal Time (UTC)\nChina does not observe daylight saving time\nCST is used consistently year-round\nTime zone ID for programming: Asia/Shanghai"
      },
      {
        "title": "1. Using System Commands",
        "body": "Windows (PowerShell)\n\nGet current system time (assumed to be CST):\n\nGet-Date\n\nGet CST time with explicit time zone:\n\n[System.TimeZoneInfo]::ConvertTimeBySystemTimeZoneId([DateTime]::UtcNow, \"China Standard Time\")\n\nFormat CST time:\n\nGet-Date -Format \"yyyy-MM-dd HH:mm:ss\"\n\nLinux/Unix (Bash)\n\nGet current system time:\n\ndate\n\nGet CST time explicitly:\n\nTZ='Asia/Shanghai' date\n\nFormat CST time:\n\ndate +\"%Y-%m-%d %H:%M:%S\"\n\nmacOS (Bash)\n\nGet current system time:\n\ndate\n\nGet CST time explicitly:\n\nTZ='Asia/Shanghai' date"
      },
      {
        "title": "2. Using Programming Languages",
        "body": "Python\n\nGet current CST time:\n\nfrom datetime import datetime\nimport pytz\n\n# Get current CST time\ncst_tz = pytz.timezone('Asia/Shanghai')\ncst_time = datetime.now(cst_tz)\n\nprint(f\"Current CST time: {cst_time}\")\nprint(f\"Formatted: {cst_time.strftime('%Y-%m-%d %H:%M:%S')}\")\n\nConvert UTC to CST:\n\nfrom datetime import datetime\nimport pytz\n\n# Get UTC time\nutc_time = datetime.utcnow().replace(tzinfo=pytz.UTC)\n\n# Convert to CST\ncst_time = utc_time.astimezone(pytz.timezone('Asia/Shanghai'))\n\nprint(f\"UTC: {utc_time}\")\nprint(f\"CST: {cst_time}\")\n\nConvert any timezone to CST:\n\nfrom datetime import datetime\nimport pytz\n\n# Example: Convert New York time to CST\nny_tz = pytz.timezone('America/New_York')\ncst_tz = pytz.timezone('Asia/Shanghai')\n\nny_time = datetime.now(ny_tz)\ncst_time = ny_time.astimezone(cst_tz)\n\nprint(f\"New York: {ny_time}\")\nprint(f\"CST: {cst_time}\")\n\nJavaScript/Node.js\n\nGet current CST time:\n\n// Using Intl API\nconst cstTime = new Date().toLocaleString('zh-CN', {\n    timeZone: 'Asia/Shanghai',\n    hour12: false\n});\nconsole.log('Current CST time:', cstTime);\n\n// Using moment-timezone (recommended)\nconst moment = require('moment-timezone');\nconst cstTime = moment().tz('Asia/Shanghai').format('YYYY-MM-DD HH:mm:ss');\nconsole.log('Current CST time:', cstTime);\n\nConvert UTC to CST:\n\nconst moment = require('moment-timezone');\nconst utcTime = moment().utc();\nconst cstTime = utcTime.tz('Asia/Shanghai').format('YYYY-MM-DD HH:mm:ss');\nconsole.log('UTC:', utcTime.format());\nconsole.log('CST:', cstTime);\n\nJava\n\nGet current CST time:\n\nimport java.time.ZoneId;\nimport java.time.ZonedDateTime;\nimport java.time.format.DateTimeFormatter;\n\n// Get current CST time\nZonedDateTime cstTime = ZonedDateTime.now(ZoneId.of(\"Asia/Shanghai\"));\nDateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\");\n\nSystem.out.println(\"Current CST time: \" + cstTime.format(formatter));\n\nConvert UTC to CST:\n\nimport java.time.ZoneId;\nimport java.time.ZonedDateTime;\nimport java.time.Instant;\n\n// Get UTC time and convert to CST\nInstant utcTime = Instant.now();\nZonedDateTime cstTime = utcTime.atZone(ZoneId.of(\"Asia/Shanghai\"));\n\nSystem.out.println(\"UTC: \" + utcTime);\nSystem.out.println(\"CST: \" + cstTime);\n\nGo\n\nGet current CST time:\n\npackage main\n\nimport (\n    \"fmt\"\n    \"time\"\n)\n\nfunc main() {\n    // Get current CST time\n    cstTime := time.Now().In(time.FixedZone(\"CST\", int(8*3600)))\n    fmt.Println(\"Current CST time:\", cstTime.Format(\"2006-01-02 15:04:05\"))\n}\n\nC#\n\nGet current CST time:\n\nusing System;\n\n// Get current CST time\nTimeZoneInfo cstZone = TimeZoneInfo.FindSystemTimeZoneById(\"China Standard Time\");\nDateTime cstTime = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, cstZone);\n\nConsole.WriteLine($\"Current CST time: {cstTime:yyyy-MM-dd HH:mm:ss}\");"
      },
      {
        "title": "3. Using Online APIs",
        "body": "World Time API:\n\ncurl \"http://worldtimeapi.org/api/timezone/Asia/Shanghai\"\n\nTimezoneDB API:\n\ncurl \"http://api.timezonedb.com/v1/get-time-zone?key=YOUR_API_KEY&by=zone&zone=Asia/Shanghai\"\n\nGoogle Maps Time Zone API:\n\ncurl \"https://maps.googleapis.com/maps/api/timezone/json?location=39.9042,116.4074&timestamp=1331161200&key=YOUR_API_KEY\""
      },
      {
        "title": "1. UTC to CST",
        "body": "Formula:\n\nCST = UTC + 8 hours\n\nPython Example:\n\nfrom datetime import datetime, timedelta\n\n# UTC to CST\nutc_time = datetime.utcnow()\ncst_time = utc_time + timedelta(hours=8)\n\nprint(f\"UTC: {utc_time}\")\nprint(f\"CST: {cst_time}\")"
      },
      {
        "title": "2. CST to UTC",
        "body": "Formula:\n\nUTC = CST - 8 hours\n\nPython Example:\n\nfrom datetime import datetime, timedelta\n\n# CST to UTC\ncst_time = datetime.now()\nutc_time = cst_time - timedelta(hours=8)\n\nprint(f\"CST: {cst_time}\")\nprint(f\"UTC: {utc_time}\")"
      },
      {
        "title": "3. Other Time Zones to CST",
        "body": "Common conversions:\n\nTime ZoneUTC OffsetCST OffsetConversionEST (Eastern)UTC-5+13 hoursEST + 13 = CSTPST (Pacific)UTC-8+16 hoursPST + 16 = CSTGMT (Greenwich)UTC+0+8 hoursGMT + 8 = CSTJST (Japan)UTC+9-1 hourJST - 1 = CSTAEST (Australia)UTC+10-2 hoursAEST - 2 = CST"
      },
      {
        "title": "Common Format Patterns",
        "body": "ISO 8601 Format:\n\n2026-02-10T21:30:45+08:00\n\nStandard Format:\n\n2026-02-10 21:30:45\n\nChinese Format:\n\n2026年2月10日 21:30:45\n\nTime Only:\n\n21:30:45\n\nDate Only:\n\n2026-02-10"
      },
      {
        "title": "Programming Language Formatting",
        "body": "Python:\n\nfrom datetime import datetime\n\ncst_time = datetime.now()\nformats = {\n    'ISO 8601': cst_time.isoformat(),\n    'Standard': cst_time.strftime('%Y-%m-%d %H:%M:%S'),\n    'Chinese': cst_time.strftime('%Y年%m月%d日 %H:%M:%S'),\n    'Time only': cst_time.strftime('%H:%M:%S'),\n    'Date only': cst_time.strftime('%Y-%m-%d')\n}\n\nfor name, formatted in formats.items():\n    print(f\"{name}: {formatted}\")\n\nJavaScript:\n\nconst moment = require('moment-timezone');\nconst cstTime = moment().tz('Asia/Shanghai');\n\nconst formats = {\n    'ISO 8601': cstTime.format(),\n    'Standard': cstTime.format('YYYY-MM-DD HH:mm:ss'),\n    'Chinese': cstTime.format('YYYY年MM月DD日 HH:mm:ss'),\n    'Time only': cstTime.format('HH:mm:ss'),\n    'Date only': cstTime.format('YYYY-MM-DD')\n};\n\nfor (const [name, formatted] of Object.entries(formats)) {\n    console.log(`${name}: ${formatted}`);\n}"
      },
      {
        "title": "1. Time Zone Handling",
        "body": "Recommendations:\n\nAlways store times in UTC and convert to CST for display\nUse IANA time zone IDs (e.g., Asia/Shanghai) instead of offsets\nHandle daylight saving time properly (CST doesn't observe DST)\nTest time zone conversions thoroughly\nDocument time zone assumptions in code"
      },
      {
        "title": "2. Time Display",
        "body": "Recommendations:\n\nDisplay time in user's preferred format\nInclude time zone information when displaying CST\nUse relative time (e.g., \"2 hours ago\") for recent events\nConsider cultural preferences for time formatting\nProvide options for 12-hour and 24-hour formats"
      },
      {
        "title": "3. Time Storage",
        "body": "Recommendations:\n\nStore timestamps in UTC in databases\nInclude time zone information in data models\nUse appropriate data types for timestamps (e.g., TIMESTAMP)\nConsider time zone changes in historical data\nDocument time zone handling in data schemas"
      },
      {
        "title": "4. Error Handling",
        "body": "Recommendations:\n\nValidate time inputs\nHandle invalid time zone IDs gracefully\nProvide clear error messages for time-related failures\nTest edge cases (leap years, time zone transitions)\nLog time-related errors for debugging"
      },
      {
        "title": "1. Scheduling Tasks",
        "body": "Example: Schedule a task at specific CST time:\n\nfrom datetime import datetime, timedelta\nimport pytz\n\n# Target CST time\ntarget_cst = datetime(2026, 2, 10, 22, 0, 0, tzinfo=pytz.timezone('Asia/Shanghai'))\n\n# Calculate time until task\nnow = datetime.now(pytz.timezone('Asia/Shanghai'))\ntime_until = target_cst - now\n\nprint(f\"Task scheduled for: {target_cst}\")\nprint(f\"Time until task: {time_until}\")"
      },
      {
        "title": "2. Logging with CST Time",
        "body": "Example: Log events with CST timestamps:\n\nimport logging\nfrom datetime import datetime\nimport pytz\n\n# Configure logging with CST time\ncst_tz = pytz.timezone('Asia/Shanghai')\nlogging.basicConfig(\n    level=logging.INFO,\n    format='%(asctime)s - %(levelname)s - %(message)s',\n    datefmt='%Y-%m-%d %H:%M:%S'\n)\n\n# Log event\nlogging.info(\"Event occurred at CST time\")"
      },
      {
        "title": "3. Displaying CST Time in Web Applications",
        "body": "Example: Display current CST time on a webpage:\n\n<!DOCTYPE html>\n<html>\n<head>\n    <title>CST Time Display</title>\n</head>\n<body>\n    <div id=\"cst-time\">Loading...</div>\n  \n    <script>\n        function updateCSTTime() {\n            const options = {\n                timeZone: 'Asia/Shanghai',\n                hour12: false,\n                year: 'numeric',\n                month: '2-digit',\n                day: '2-digit',\n                hour: '2-digit',\n                minute: '2-digit',\n                second: '2-digit'\n            };\n            const cstTime = new Date().toLocaleString('zh-CN', options);\n            document.getElementById('cst-time').textContent = 'CST: ' + cstTime;\n        }\n    \n        // Update every second\n        setInterval(updateCSTTime, 1000);\n        updateCSTTime();\n    </script>\n</body>\n</html>"
      },
      {
        "title": "4. Converting User Input to CST",
        "body": "Example: Convert user-provided time to CST:\n\nfrom datetime import datetime\nimport pytz\nfrom dateutil import parser\n\n# User input time (could be any format)\nuser_input = \"2026-02-10 14:30:00\"\n\n# Parse user input\nuser_time = parser.parse(user_input)\n\n# Assume user time is in their local timezone\nuser_tz = pytz.timezone('America/New_York')\nuser_time = user_tz.localize(user_time)\n\n# Convert to CST\ncst_tz = pytz.timezone('Asia/Shanghai')\ncst_time = user_time.astimezone(cst_tz)\n\nprint(f\"User time: {user_time}\")\nprint(f\"CST time: {cst_time}\")"
      },
      {
        "title": "Common Issues",
        "body": "IssuePossible CauseSolutionWrong time displayedSystem time zone not set to CSTChange system time zone to Asia/ShanghaiTime off by 1 hourDaylight saving time confusionRemember CST doesn't observe DSTTime conversion errorsIncorrect time zone IDUse Asia/Shanghai instead of CSTTime not updatingCaching or stale dataClear cache and refreshTime display issuesFormat string errorsVerify format string syntax"
      },
      {
        "title": "Debugging Tips",
        "body": "Verify system time zone:\n\nWindows: Check Date & Time settings\nLinux: Check /etc/timezone or timedatectl\nmacOS: Check System Preferences > Date & Time\n\n\n\nTest time zone conversions:\n\nUse known reference times\nVerify conversions with multiple tools\nCheck for daylight saving time issues\n\n\n\nMonitor time-related logs:\n\nLook for time zone warnings\nCheck for conversion errors\nVerify timestamp consistency"
      },
      {
        "title": "Conclusion",
        "body": "Working with CST (China Standard Time) requires understanding of time zone handling, proper conversion methods, and careful attention to formatting and display. By following the guidance in this skill, you can:\n\nAccurately obtain and display CST time\nConvert between different time zones and CST\nIntegrate CST time handling in applications\nSchedule tasks based on CST\nHandle time-related operations correctly and consistently\n\nRemember that CST is UTC+8 year-round and does not observe daylight saving time, which simplifies time handling compared to many other time zones. Always test time-related functionality thoroughly and handle edge cases appropriately."
      }
    ],
    "body": "CST Time (China Standard Time)\nOverview\n\nThis skill provides comprehensive guidance for obtaining and working with China Standard Time (CST), which is UTC+8 and used throughout mainland China. It covers various methods for getting local CST time, time zone conversions, and integration with different programming languages and systems.\n\nPurpose\n\nCST Time skill helps in:\n\nGetting current CST time from local system\nConverting between different time zones and CST\nIntegrating CST time handling in applications\nScheduling tasks based on CST\nDisplaying and formatting CST time correctly\nHandling daylight saving time considerations (CST doesn't observe DST)\nCST Time Zone Information\n\nTime Zone Details:\n\nName: China Standard Time (CST)\nUTC Offset: UTC+8\nDaylight Saving Time: Not observed\nRegion: Mainland China\nIANA Time Zone ID: Asia/Shanghai\n\nImportant Notes:\n\nCST is 8 hours ahead of Coordinated Universal Time (UTC)\nChina does not observe daylight saving time\nCST is used consistently year-round\nTime zone ID for programming: Asia/Shanghai\nGetting CST Time\n1. Using System Commands\nWindows (PowerShell)\n\nGet current system time (assumed to be CST):\n\nGet-Date\n\n\nGet CST time with explicit time zone:\n\n[System.TimeZoneInfo]::ConvertTimeBySystemTimeZoneId([DateTime]::UtcNow, \"China Standard Time\")\n\n\nFormat CST time:\n\nGet-Date -Format \"yyyy-MM-dd HH:mm:ss\"\n\nLinux/Unix (Bash)\n\nGet current system time:\n\ndate\n\n\nGet CST time explicitly:\n\nTZ='Asia/Shanghai' date\n\n\nFormat CST time:\n\ndate +\"%Y-%m-%d %H:%M:%S\"\n\nmacOS (Bash)\n\nGet current system time:\n\ndate\n\n\nGet CST time explicitly:\n\nTZ='Asia/Shanghai' date\n\n2. Using Programming Languages\nPython\n\nGet current CST time:\n\nfrom datetime import datetime\nimport pytz\n\n# Get current CST time\ncst_tz = pytz.timezone('Asia/Shanghai')\ncst_time = datetime.now(cst_tz)\n\nprint(f\"Current CST time: {cst_time}\")\nprint(f\"Formatted: {cst_time.strftime('%Y-%m-%d %H:%M:%S')}\")\n\n\nConvert UTC to CST:\n\nfrom datetime import datetime\nimport pytz\n\n# Get UTC time\nutc_time = datetime.utcnow().replace(tzinfo=pytz.UTC)\n\n# Convert to CST\ncst_time = utc_time.astimezone(pytz.timezone('Asia/Shanghai'))\n\nprint(f\"UTC: {utc_time}\")\nprint(f\"CST: {cst_time}\")\n\n\nConvert any timezone to CST:\n\nfrom datetime import datetime\nimport pytz\n\n# Example: Convert New York time to CST\nny_tz = pytz.timezone('America/New_York')\ncst_tz = pytz.timezone('Asia/Shanghai')\n\nny_time = datetime.now(ny_tz)\ncst_time = ny_time.astimezone(cst_tz)\n\nprint(f\"New York: {ny_time}\")\nprint(f\"CST: {cst_time}\")\n\nJavaScript/Node.js\n\nGet current CST time:\n\n// Using Intl API\nconst cstTime = new Date().toLocaleString('zh-CN', {\n    timeZone: 'Asia/Shanghai',\n    hour12: false\n});\nconsole.log('Current CST time:', cstTime);\n\n// Using moment-timezone (recommended)\nconst moment = require('moment-timezone');\nconst cstTime = moment().tz('Asia/Shanghai').format('YYYY-MM-DD HH:mm:ss');\nconsole.log('Current CST time:', cstTime);\n\n\nConvert UTC to CST:\n\nconst moment = require('moment-timezone');\nconst utcTime = moment().utc();\nconst cstTime = utcTime.tz('Asia/Shanghai').format('YYYY-MM-DD HH:mm:ss');\nconsole.log('UTC:', utcTime.format());\nconsole.log('CST:', cstTime);\n\nJava\n\nGet current CST time:\n\nimport java.time.ZoneId;\nimport java.time.ZonedDateTime;\nimport java.time.format.DateTimeFormatter;\n\n// Get current CST time\nZonedDateTime cstTime = ZonedDateTime.now(ZoneId.of(\"Asia/Shanghai\"));\nDateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\");\n\nSystem.out.println(\"Current CST time: \" + cstTime.format(formatter));\n\n\nConvert UTC to CST:\n\nimport java.time.ZoneId;\nimport java.time.ZonedDateTime;\nimport java.time.Instant;\n\n// Get UTC time and convert to CST\nInstant utcTime = Instant.now();\nZonedDateTime cstTime = utcTime.atZone(ZoneId.of(\"Asia/Shanghai\"));\n\nSystem.out.println(\"UTC: \" + utcTime);\nSystem.out.println(\"CST: \" + cstTime);\n\nGo\n\nGet current CST time:\n\npackage main\n\nimport (\n    \"fmt\"\n    \"time\"\n)\n\nfunc main() {\n    // Get current CST time\n    cstTime := time.Now().In(time.FixedZone(\"CST\", int(8*3600)))\n    fmt.Println(\"Current CST time:\", cstTime.Format(\"2006-01-02 15:04:05\"))\n}\n\nC#\n\nGet current CST time:\n\nusing System;\n\n// Get current CST time\nTimeZoneInfo cstZone = TimeZoneInfo.FindSystemTimeZoneById(\"China Standard Time\");\nDateTime cstTime = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, cstZone);\n\nConsole.WriteLine($\"Current CST time: {cstTime:yyyy-MM-dd HH:mm:ss}\");\n\n3. Using Online APIs\n\nWorld Time API:\n\ncurl \"http://worldtimeapi.org/api/timezone/Asia/Shanghai\"\n\n\nTimezoneDB API:\n\ncurl \"http://api.timezonedb.com/v1/get-time-zone?key=YOUR_API_KEY&by=zone&zone=Asia/Shanghai\"\n\n\nGoogle Maps Time Zone API:\n\ncurl \"https://maps.googleapis.com/maps/api/timezone/json?location=39.9042,116.4074&timestamp=1331161200&key=YOUR_API_KEY\"\n\nTime Zone Conversions\n1. UTC to CST\n\nFormula:\n\nCST = UTC + 8 hours\n\n\nPython Example:\n\nfrom datetime import datetime, timedelta\n\n# UTC to CST\nutc_time = datetime.utcnow()\ncst_time = utc_time + timedelta(hours=8)\n\nprint(f\"UTC: {utc_time}\")\nprint(f\"CST: {cst_time}\")\n\n2. CST to UTC\n\nFormula:\n\nUTC = CST - 8 hours\n\n\nPython Example:\n\nfrom datetime import datetime, timedelta\n\n# CST to UTC\ncst_time = datetime.now()\nutc_time = cst_time - timedelta(hours=8)\n\nprint(f\"CST: {cst_time}\")\nprint(f\"UTC: {utc_time}\")\n\n3. Other Time Zones to CST\n\nCommon conversions:\n\nTime Zone\tUTC Offset\tCST Offset\tConversion\nEST (Eastern)\tUTC-5\t+13 hours\tEST + 13 = CST\nPST (Pacific)\tUTC-8\t+16 hours\tPST + 16 = CST\nGMT (Greenwich)\tUTC+0\t+8 hours\tGMT + 8 = CST\nJST (Japan)\tUTC+9\t-1 hour\tJST - 1 = CST\nAEST (Australia)\tUTC+10\t-2 hours\tAEST - 2 = CST\nFormatting CST Time\nCommon Format Patterns\n\nISO 8601 Format:\n\n2026-02-10T21:30:45+08:00\n\n\nStandard Format:\n\n2026-02-10 21:30:45\n\n\nChinese Format:\n\n2026年2月10日 21:30:45\n\n\nTime Only:\n\n21:30:45\n\n\nDate Only:\n\n2026-02-10\n\nProgramming Language Formatting\n\nPython:\n\nfrom datetime import datetime\n\ncst_time = datetime.now()\nformats = {\n    'ISO 8601': cst_time.isoformat(),\n    'Standard': cst_time.strftime('%Y-%m-%d %H:%M:%S'),\n    'Chinese': cst_time.strftime('%Y年%m月%d日 %H:%M:%S'),\n    'Time only': cst_time.strftime('%H:%M:%S'),\n    'Date only': cst_time.strftime('%Y-%m-%d')\n}\n\nfor name, formatted in formats.items():\n    print(f\"{name}: {formatted}\")\n\n\nJavaScript:\n\nconst moment = require('moment-timezone');\nconst cstTime = moment().tz('Asia/Shanghai');\n\nconst formats = {\n    'ISO 8601': cstTime.format(),\n    'Standard': cstTime.format('YYYY-MM-DD HH:mm:ss'),\n    'Chinese': cstTime.format('YYYY年MM月DD日 HH:mm:ss'),\n    'Time only': cstTime.format('HH:mm:ss'),\n    'Date only': cstTime.format('YYYY-MM-DD')\n};\n\nfor (const [name, formatted] of Object.entries(formats)) {\n    console.log(`${name}: ${formatted}`);\n}\n\nBest Practices\n1. Time Zone Handling\n\nRecommendations:\n\nAlways store times in UTC and convert to CST for display\nUse IANA time zone IDs (e.g., Asia/Shanghai) instead of offsets\nHandle daylight saving time properly (CST doesn't observe DST)\nTest time zone conversions thoroughly\nDocument time zone assumptions in code\n2. Time Display\n\nRecommendations:\n\nDisplay time in user's preferred format\nInclude time zone information when displaying CST\nUse relative time (e.g., \"2 hours ago\") for recent events\nConsider cultural preferences for time formatting\nProvide options for 12-hour and 24-hour formats\n3. Time Storage\n\nRecommendations:\n\nStore timestamps in UTC in databases\nInclude time zone information in data models\nUse appropriate data types for timestamps (e.g., TIMESTAMP)\nConsider time zone changes in historical data\nDocument time zone handling in data schemas\n4. Error Handling\n\nRecommendations:\n\nValidate time inputs\nHandle invalid time zone IDs gracefully\nProvide clear error messages for time-related failures\nTest edge cases (leap years, time zone transitions)\nLog time-related errors for debugging\nCommon Use Cases\n1. Scheduling Tasks\n\nExample: Schedule a task at specific CST time:\n\nfrom datetime import datetime, timedelta\nimport pytz\n\n# Target CST time\ntarget_cst = datetime(2026, 2, 10, 22, 0, 0, tzinfo=pytz.timezone('Asia/Shanghai'))\n\n# Calculate time until task\nnow = datetime.now(pytz.timezone('Asia/Shanghai'))\ntime_until = target_cst - now\n\nprint(f\"Task scheduled for: {target_cst}\")\nprint(f\"Time until task: {time_until}\")\n\n2. Logging with CST Time\n\nExample: Log events with CST timestamps:\n\nimport logging\nfrom datetime import datetime\nimport pytz\n\n# Configure logging with CST time\ncst_tz = pytz.timezone('Asia/Shanghai')\nlogging.basicConfig(\n    level=logging.INFO,\n    format='%(asctime)s - %(levelname)s - %(message)s',\n    datefmt='%Y-%m-%d %H:%M:%S'\n)\n\n# Log event\nlogging.info(\"Event occurred at CST time\")\n\n3. Displaying CST Time in Web Applications\n\nExample: Display current CST time on a webpage:\n\n<!DOCTYPE html>\n<html>\n<head>\n    <title>CST Time Display</title>\n</head>\n<body>\n    <div id=\"cst-time\">Loading...</div>\n  \n    <script>\n        function updateCSTTime() {\n            const options = {\n                timeZone: 'Asia/Shanghai',\n                hour12: false,\n                year: 'numeric',\n                month: '2-digit',\n                day: '2-digit',\n                hour: '2-digit',\n                minute: '2-digit',\n                second: '2-digit'\n            };\n            const cstTime = new Date().toLocaleString('zh-CN', options);\n            document.getElementById('cst-time').textContent = 'CST: ' + cstTime;\n        }\n    \n        // Update every second\n        setInterval(updateCSTTime, 1000);\n        updateCSTTime();\n    </script>\n</body>\n</html>\n\n4. Converting User Input to CST\n\nExample: Convert user-provided time to CST:\n\nfrom datetime import datetime\nimport pytz\nfrom dateutil import parser\n\n# User input time (could be any format)\nuser_input = \"2026-02-10 14:30:00\"\n\n# Parse user input\nuser_time = parser.parse(user_input)\n\n# Assume user time is in their local timezone\nuser_tz = pytz.timezone('America/New_York')\nuser_time = user_tz.localize(user_time)\n\n# Convert to CST\ncst_tz = pytz.timezone('Asia/Shanghai')\ncst_time = user_time.astimezone(cst_tz)\n\nprint(f\"User time: {user_time}\")\nprint(f\"CST time: {cst_time}\")\n\nTroubleshooting\nCommon Issues\nIssue\tPossible Cause\tSolution\nWrong time displayed\tSystem time zone not set to CST\tChange system time zone to Asia/Shanghai\nTime off by 1 hour\tDaylight saving time confusion\tRemember CST doesn't observe DST\nTime conversion errors\tIncorrect time zone ID\tUse Asia/Shanghai instead of CST\nTime not updating\tCaching or stale data\tClear cache and refresh\nTime display issues\tFormat string errors\tVerify format string syntax\nDebugging Tips\n\nVerify system time zone:\n\nWindows: Check Date & Time settings\nLinux: Check /etc/timezone or timedatectl\nmacOS: Check System Preferences > Date & Time\n\nTest time zone conversions:\n\nUse known reference times\nVerify conversions with multiple tools\nCheck for daylight saving time issues\n\nMonitor time-related logs:\n\nLook for time zone warnings\nCheck for conversion errors\nVerify timestamp consistency\nConclusion\n\nWorking with CST (China Standard Time) requires understanding of time zone handling, proper conversion methods, and careful attention to formatting and display. By following the guidance in this skill, you can:\n\nAccurately obtain and display CST time\nConvert between different time zones and CST\nIntegrate CST time handling in applications\nSchedule tasks based on CST\nHandle time-related operations correctly and consistently\n\nRemember that CST is UTC+8 year-round and does not observe daylight saving time, which simplifies time handling compared to many other time zones. Always test time-related functionality thoroughly and handle edge cases appropriately."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/xuanpass/cst-time",
    "publisherUrl": "https://clawhub.ai/xuanpass/cst-time",
    "owner": "xuanpass",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/cst-time",
    "downloadUrl": "https://openagent3.xyz/downloads/cst-time",
    "agentUrl": "https://openagent3.xyz/skills/cst-time/agent",
    "manifestUrl": "https://openagent3.xyz/skills/cst-time/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/cst-time/agent.md"
  }
}