본문으로 건너뛰기
Skillpedia
일반 코딩40k · #7180

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/dotnet-timezone/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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:

  1. Extract each location from the input.
  2. Read references/timezone-index.md for common Windows and IANA mappings.
  3. If the exact location is not listed, infer the correct IANA zone from geography, then map it to the Windows ID.
  4. 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, and TimeZoneConverter

Generate Code

Use references/code-patterns.md and pick the smallest pattern that fits:

  • Pattern 1: TimeZoneInfo for Windows-only code
  • Pattern 2: TimeZoneConverter for cross-platform conversion
  • Pattern 3: NodaTime for strict timezone arithmetic and DST-sensitive scheduling
  • Pattern 4: DateTimeOffset for 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.Now in databases; store UTC instead.
  • Treat DateTimeKind.Unspecified as 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:

  1. Return the resolved timezone block for each location.
  2. State the recommended implementation in one sentence.
  3. Include a copy-paste-ready C# snippet.

For code and architecture requests:

  1. State the recommended approach in one sentence.
  2. Provide the timezone IDs if relevant.
  3. Include the minimal working code snippet.
  4. Mention the package requirement if needed.
  5. Add one pitfall warning if it matters.

Keep responses concise and code-first.

References

  • references/timezone-index.md: common Windows and IANA timezone mappings
  • references/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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬