$npx -y skills add Dianel555/DSkills --skill timeTime and timezone utilities for getting current time and converting between timezones. Use when: (1) Getting current time in any timezone, (2) Converting time between different timezones, (3) Working with IANA timezone names, (4) Scheduling across timezones, (5) Time-sensitive op
| 1 | # Time |
| 2 | |
| 3 | Time and timezone conversion utilities. Standalone CLI only (no MCP dependency). |
| 4 | |
| 5 | ## Execution Methods |
| 6 | |
| 7 | Run `scripts/time_cli.py` via Bash: |
| 8 | |
| 9 | ```bash |
| 10 | # Prerequisites: pip install pytz (or use Python 3.9+ with zoneinfo) |
| 11 | |
| 12 | # Get current time in a timezone |
| 13 | python scripts/time_cli.py get --timezone "Asia/Shanghai" |
| 14 | python scripts/time_cli.py get --timezone "America/New_York" |
| 15 | python scripts/time_cli.py get # Uses system timezone |
| 16 | |
| 17 | # Convert time between timezones |
| 18 | python scripts/time_cli.py convert \ |
| 19 | --time "16:30" \ |
| 20 | --from "America/New_York" \ |
| 21 | --to "Asia/Tokyo" |
| 22 | |
| 23 | # List available timezones |
| 24 | python scripts/time_cli.py list [--filter "Asia"] |
| 25 | ``` |
| 26 | |
| 27 | ## Tool Capability Matrix |
| 28 | |
| 29 | | Tool | Parameters | Output | |
| 30 | |------|------------|--------| |
| 31 | | `get_current_time` | `timezone` (required, IANA name) | `{timezone, datetime, is_dst}` | |
| 32 | | `convert_time` | `source_timezone`, `time` (HH:MM), `target_timezone` | `{source, target, time_difference}` | |
| 33 | |
| 34 | ## Common IANA Timezone Names |
| 35 | |
| 36 | | Region | Timezone | |
| 37 | |--------|----------| |
| 38 | | China | `Asia/Shanghai` | |
| 39 | | Japan | `Asia/Tokyo` | |
| 40 | | Korea | `Asia/Seoul` | |
| 41 | | US East | `America/New_York` | |
| 42 | | US West | `America/Los_Angeles` | |
| 43 | | UK | `Europe/London` | |
| 44 | | Germany | `Europe/Berlin` | |
| 45 | | France | `Europe/Paris` | |
| 46 | | Australia | `Australia/Sydney` | |
| 47 | | UTC | `UTC` | |
| 48 | |
| 49 | ## Workflow |
| 50 | |
| 51 | ### Getting Current Time |
| 52 | 1. Identify target timezone (use IANA name) |
| 53 | 2. Call `get_current_time` with timezone parameter |
| 54 | 3. Response includes ISO 8601 datetime and DST status |
| 55 | |
| 56 | ### Converting Time |
| 57 | 1. Identify source timezone and time (24-hour format HH:MM) |
| 58 | 2. Identify target timezone |
| 59 | 3. Call `convert_time` with all parameters |
| 60 | 4. Response includes both times and time difference |
| 61 | |
| 62 | ## Output Format |
| 63 | |
| 64 | ### get_current_time Response |
| 65 | ```json |
| 66 | { |
| 67 | "timezone": "Asia/Shanghai", |
| 68 | "datetime": "2024-01-01T21:00:00+08:00", |
| 69 | "is_dst": false |
| 70 | } |
| 71 | ``` |
| 72 | |
| 73 | ### convert_time Response |
| 74 | ```json |
| 75 | { |
| 76 | "source": { |
| 77 | "timezone": "America/New_York", |
| 78 | "datetime": "2024-01-01T16:30:00-05:00", |
| 79 | "is_dst": false |
| 80 | }, |
| 81 | "target": { |
| 82 | "timezone": "Asia/Tokyo", |
| 83 | "datetime": "2024-01-02T06:30:00+09:00", |
| 84 | "is_dst": false |
| 85 | }, |
| 86 | "time_difference": "+14.0h" |
| 87 | } |
| 88 | ``` |
| 89 | |
| 90 | ## Error Handling |
| 91 | |
| 92 | | Error | Recovery | |
| 93 | |-------|----------| |
| 94 | | Invalid timezone | Check IANA timezone name spelling | |
| 95 | | Invalid time format | Use 24-hour format HH:MM | |
| 96 | | MCP unavailable | Fall back to CLI script | |
| 97 | |
| 98 | ## Anti-Patterns |
| 99 | |
| 100 | | Prohibited | Correct | |
| 101 | |------------|---------| |
| 102 | | Use city names directly | Use IANA timezone names (e.g., `Asia/Tokyo` not `Tokyo`) | |
| 103 | | Use 12-hour format | Use 24-hour format (e.g., `16:30` not `4:30 PM`) | |
| 104 | | Assume timezone | Always specify timezone explicitly | |