dotnet-timezone
하는 일
이 도구는 C#(.NET) 코드에서 시간대를 다루는 프로그래머를 돕습니다. 서로 다른 지역 간 시간을 변환하는 방법, 일광 절약 시간을 이해하는 방법, 코드가 여러 운영체제에서 올바르게 작동하도록 하는 방법을 안내합니다.
사용하는 경우
- ✓특정 도시의 시간대를 알아야 할 때.
- ✓UTC와 현지 시간 사이에서 시간을 변환할 때.
- ✓코드가 Windows와 Linux 컴퓨터 모두에서 올바르게 작동하도록 할 때.
스킬 링크
https://github.com/github/awesome-copilot/blob/main/skills/dotnet-timezone/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“도쿄의 시간대가 무엇인지 알려 주고, 현재 UTC 시간을 도쿄 시간으로 바꾸는 C# 코드 예제를 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
도구는 알려진 시간대 인덱스를 찾고 .NET 라이브러리를 사용해 올바른 정보를 찾습니다. 필요에 따라(단순 변환이나 복잡한 일정 관리 등) 바로 쓸 수 있는 코드 조각을 생성할 수 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
.NET Timezone
Resolve timezone questions for .NET and C# code with production-safe guidance and copy-paste-ready snippets.
Start With The Right Path
Identify the request type first:
- Address or location lookup
- Timezone ID lookup
- UTC/local conversion
- Cross-platform timezone compatibility
- Scheduling or DST handling
- API or persistence design
If the library is unclear, default to TimeZoneConverter for cross-platform work. If the scenario involves recurring schedules or strict DST rules, prefer NodaTime.
Resolve Addresses And Locations
If the user provides an address, city, region, country, or document containing place names:
- Extract each location from the input.
- Read
references/timezone-index.mdfor common Windows and IANA mappings. - If the exact location is not listed, infer the correct IANA zone from geography, then map it to the Windows ID.
- Return both IDs and a ready-to-use C# example.
For each resolved location, provide:
Location: <resolved place>
Windows ID: <windows id>
IANA ID: <iana id>
UTC offset: <standard offset and DST offset when relevant>
DST: <yes/no>
Then include a cross-platform snippet like:
using TimeZoneConverter;
TimeZoneInfo tz = TZConvert.GetTimeZoneInfo("Asia/Colombo");
DateTime local = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, tz);
If multiple locations are present, include one block per location and then a combined multi-timezone snippet.
If a location is ambiguous, list the possible timezone matches and ask the user to choose the correct one.
Look Up Timezone IDs
Use references/timezone-index.md for Windows to IANA mappings.
Always provide both formats:
- Windows ID for
TimeZoneInfo.FindSystemTimeZoneById()on Windows - IANA ID for Linux, containers,
NodaTime, andTimeZoneConverter
Generate Code
Use references/code-patterns.md and pick the smallest pattern that fits:
- Pattern 1:
TimeZoneInfofor Windows-only code - Pattern 2:
TimeZoneConverterfor cross-platform conversion - Pattern 3:
NodaTimefor strict timezone arithmetic and DST-sensitive scheduling - Pattern 4:
DateTimeOffsetfor APIs and data transfer - Pattern 5: ASP.NET Core persistence and presentation
- Pattern 6: recurring jobs and schedulers
- Pattern 7: ambiguous and invalid DST timestamps
Always include package guidance when recommending third-party libraries.
Warn About Common Pitfalls
Mention the relevant warning when applicable:
TimeZoneInfo.FindSystemTimeZoneById()is platform-specific for timezone IDs.- Avoid storing
DateTime.Nowin databases; store UTC instead. - Treat
DateTimeKind.Unspecifiedas a bug risk unless it is deliberate input. - DST transitions can skip or repeat local times.
- Azure Windows and Azure Linux environments may expect different timezone ID formats.
Response Shape
For address and location requests:
- Return the resolved timezone block for each location.
- State the recommended implementation in one sentence.
- Include a copy-paste-ready C# snippet.
For code and architecture requests:
- State the recommended approach in one sentence.
- Provide the timezone IDs if relevant.
- Include the minimal working code snippet.
- Mention the package requirement if needed.
- Add one pitfall warning if it matters.
Keep responses concise and code-first.
References
references/timezone-index.md: common Windows and IANA timezone mappingsreferences/code-patterns.md: ready-to-use .NET timezone patterns
자주 묻는 질문
UTC가 무엇인가요?
UTC(협정 세계시)는 세계가 시계를 맞추는 기준 시간입니다. '그리니치 표준시'(GMT)와 비슷하지만 더 정밀합니다.
일광 절약 시간(DST)이란 무엇인가요?
보통 봄에 시계를 한 시간 앞당겨 낮 시간을 더 효율적으로 쓰는 제도입니다. 모든 지역이 이를 시행하는 것은 아닙니다.
코드에서 왜 시간대에 신경 써야 하나요?
애플리케이션이 여러 지역이나 자신의 지역에서 온 날짜와 시간을 다룬다면, 올바른 시간대를 쓰는 것이 오류를 피하는 데 매우 중요합니다. 특히 여러 지역의 사용자에게 일정을 잡거나 정보를 보여 줄 때 그렇습니다.
상세 정보
작성자의 원본 설명
.NET timezone handling guidance for C# applications. Use when working with TimeZoneInfo, DateTimeOffset, NodaTime, UTC conversion, daylight saving time, scheduling across timezones, cross-platform Windows/IANA timezone IDs, or when a .NET user needs the timezone for a city, address, region, or country and copy-paste-ready C# code.
repo: github/awesome-copilot
인기도
- GitHub 스타
- 40k
- 순위
- #7180
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
acquire-codebase-knowledge
40k에이전트가 기존 코드 프로젝트를 이해하고 문서화하도록 돕습니다. 새 구성원을 맞이하거나 아키텍처를 개괄적으로 파악할 때 유용합니다.
acreadiness-assess
40k에이전트가 프로젝트의 AI 준비 상태를 평가하고 보고서를 만들도록 합니다. 프로젝트가 AI 도구를 쓸 준비가 얼마나 되어 있는지 이해하는 데 유용합니다.
acreadiness-generate-instructions
40k에이전트가 평가 결과를 바탕으로 AI 도구를 위한 지침을 만들도록 돕습니다. AI가 코드와 상호작용하는 방식을 개선하고 확인된 공백을 메울 때 유용합니다.
acreadiness-policy
40k에이전트가 AI 프로젝트 평가를 위한 정책을 정의하거나 적용하도록 돕습니다. 프로젝트 평가 방식을 표준화하고 규정 준수를 보장할 때 유용합니다.