C# FindTimeZoneById()
소개:
C#에서 시간대를 처리할 때 TimeZoneInfo
클래스는 시간대 정보에 액세스하고 조작하는 편리한 방법을 제공합니다. FindTimeZoneById()
메소드를 사용하면 식별자를 통해 특정 시간대에 대한 TimeZoneInfo
객체를 검색할 수 있습니다. 그러나 지원되는 모든 시간대 식별자의 전체 목록을 찾는 것은 어려울 수 있습니다.
접속 시간대 ID 목록:
시간대 ID의 전체 목록을 얻으려면 TimeZoneInfo
클래스의 GetSystemTimeZones()
메서드를 사용하세요. 이 메서드는 운영 체제에서 지원하는 모든 시간대를 포함하는 IEnumerable<timezoneinfo></timezoneinfo>
컬렉션을 반환합니다.
코드 예:
다음 코드 조각은 GetSystemTimeZones()
메서드를 사용하여 모든 시간대 ID 목록을 인쇄하는 방법을 보여줍니다.
using System; namespace TimeZoneIds { class Program { static void Main(string[] args) { foreach (TimeZoneInfo z in TimeZoneInfo.GetSystemTimeZones()) { Console.WriteLine(z.Id); } } } }
결과:
Windows 7 워크스테이션에서 실행하면 위 코드는 다음과 같은 시간대 ID 목록을 출력합니다.
<code>Dateline Standard Time UTC-11 Samoa Standard Time Hawaiian Standard Time Alaskan Standard Time Pacific Standard Time (Mexico) Pacific Standard Time US Mountain Standard Time Mountain Standard Time (Mexico) Mountain Standard Time Central America Standard Time Central Standard Time Central Standard Time (Mexico) Canada Central Standard Time SA Pacific Standard Time Eastern Standard Time US Eastern Standard Time Venezuela Standard Time Paraguay Standard Time Atlantic Standard Time Central Brazilian Standard Time SA Western Standard Time Pacific SA Standard Time Newfoundland Standard Time E. South America Standard Time Argentina Standard Time SA Eastern Standard Time Greenland Standard Time Montevideo Standard Time UTC-02 Mid-Atlantic Standard Time Azores Standard Time Cape Verde Standard Time Morocco Standard Time UTC GMT Standard Time Greenwich Standard Time W. Europe Standard Time Central Europe Standard Time Romance Standard Time Central European Standard Time W. Central Africa Standard Time Namibia Standard Time Jordan Standard Time GTB Standard Time Middle East Standard Time Egypt Standard Time Syria Standard Time South Africa Standard Time FLE Standard Time Israel Standard Time E. Europe Standard Time Arabic Standard Time Arab Standard Time Russian Standard Time E. Africa Standard Time Iran Standard Time Arabian Standard Time Azerbaijan Standard Time Mauritius Standard Time Georgian Standard Time Caucasus Standard Time Afghanistan Standard Time Ekaterinburg Standard Time Pakistan Standard Time West Asia Standard Time India Standard Time Sri Lanka Standard Time Nepal Standard Time Central Asia Standard Time Bangladesh Standard Time N. Central Asia Standard Time Myanmar Standard Time SE Asia Standard Time North Asia Standard Time China Standard Time North Asia East Standard Time Singapore Standard Time W. Australia Standard Time Taipei Standard Time Ulaanbaatar Standard Time Tokyo Standard Time Korea Standard Time Yakutsk Standard Time Cen. Australia Standard Time AUS Central Standard Time E. Australia Standard Time AUS Eastern Standard Time West Pacific Standard Time Tasmania Standard Time Vladivostok Standard Time Central Pacific Standard Time New Zealand Standard Time UTC+12 Fiji Standard Time Kamchatka Standard Time Tonga Standard Time</code>
추가 참고사항:
지원되는 시간대 ID 목록은 운영 체제 및 업데이트에 따라 다를 수 있습니다. 최신 목록에 액세스하려면 시간대 식별자의 전체 데이터베이스를 유지 관리하는 라이브러리나 온라인 리소스를 사용하는 것이 좋습니다.
위 내용은 C#의 `FindTimeZoneById()`와 함께 사용할 전체 시간대 ID 목록을 어떻게 얻을 수 있나요?의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

이 기사에서는 컨테이너, 반복자, 알고리즘 및 함수 인 핵심 구성 요소에 중점을 둔 C 표준 템플릿 라이브러리 (STL)에 대해 설명합니다. 일반적인 프로그래밍을 가능하게하기 위해 이러한 상호 작용, 코드 효율성 및 가독성 개선 방법에 대해 자세히 설명합니다.

이 기사는 효율적인 STL 알고리즘 사용을 자세히 설명합니다. 데이터 구조 선택 (벡터 대 목록), 알고리즘 복잡성 분석 (예 : std :: sort vs. std :: partial_sort), 반복자 사용 및 병렬 실행을 강조합니다. 일반적인 함정과 같은

이 기사는 C에서 효과적인 예외 처리를 자세히 설명하고, 시도, 캐치 및 던지기 메커니즘을 다룹니다. RAII와 같은 모범 사례, 불필요한 캐치 블록을 피하고 강력한 코드에 대한 예외를 기록합니다. 이 기사는 또한 Perf를 다룹니다

이 기사는 C에서 Move Semantics를 사용하여 불필요한 복사를 피함으로써 성능을 향상시키는 것에 대해 논의합니다. STD :: MOVE를 사용하여 이동 생성자 및 할당 연산자 구현을 다루고 효과적인 APPL을위한 주요 시나리오 및 함정을 식별합니다.

C 20 범위는 표현성, 합성 가능성 및 효율성으로 데이터 조작을 향상시킵니다. 더 나은 성능과 유지 관리를 위해 복잡한 변환을 단순화하고 기존 코드베이스에 통합합니다.

이 기사는 C의 동적 파견, 성능 비용 및 최적화 전략에 대해 설명합니다. 동적 파견이 성능에 영향을 미치는 시나리오를 강조하고이를 정적 파견과 비교하여 성능과 성능 간의 트레이드 오프를 강조합니다.

기사는 Move Semantics, Perfect Forwarding 및 Resource Management에 대한 C에서 RValue 참조의 효과적인 사용에 대해 논의하여 모범 사례 및 성능 향상을 강조합니다 (159 자).

C 메모리 관리는 새로운, 삭제 및 스마트 포인터를 사용합니다. 이 기사는 매뉴얼 대 자동화 된 관리 및 스마트 포인터가 메모리 누출을 방지하는 방법에 대해 설명합니다.


핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

Atom Editor Mac 버전 다운로드
가장 인기 있는 오픈 소스 편집기

드림위버 CS6
시각적 웹 개발 도구

Dreamweaver Mac版
시각적 웹 개발 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

MinGW - Windows용 미니멀리스트 GNU
이 프로젝트는 osdn.net/projects/mingw로 마이그레이션되는 중입니다. 계속해서 그곳에서 우리를 팔로우할 수 있습니다. MinGW: GCC(GNU Compiler Collection)의 기본 Windows 포트로, 기본 Windows 애플리케이션을 구축하기 위한 무료 배포 가능 가져오기 라이브러리 및 헤더 파일로 C99 기능을 지원하는 MSVC 런타임에 대한 확장이 포함되어 있습니다. 모든 MinGW 소프트웨어는 64비트 Windows 플랫폼에서 실행될 수 있습니다.
