---
title: "Discussion on \"c# 时间日期转换\" | Hashnode"
description: "Discussion on \"c# 时间日期转换\". 引言\n日常开发中，经常会遇到字符串和DateTime类型转换、不同时区之间的日期转换。这里讲解下\n转换UTC\nTimeZoneInfo.ConvertTimeToUtc(DateTime dateTime, TimeZoneInfo sourceTimeZone)\n显式指定时区，转换utc\nvar zone = TimeZoneInfo.FindSystemTimeZoneById(\"China Standard Time\");\nvar date = Convert.ToDateTime(\"19..."
url: "https://hashnode.com/posts/csharpdatetimeconvert/65d445476fb6a8ab15420a4f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [c# 时间日期转换](https://docs.inorah.xyz/csharpdatetimeconvert?utm_source=hashnode&utm_medium=feed)

引言 日常开发中，经常会遇到字符串和DateTime类型转换、不同时区之间的日期转换。这里讲解下 转换UTC TimeZoneInfo.ConvertTimeToUtc(DateTime dateTime, TimeZoneInfo sourceTimeZone) 显式指定时区，转换utc var zone = TimeZoneInfo.FindSystemTimeZoneById("China Standard Time"); var date = Convert.ToDateTime("19...

Feb 20, 2024 · 1 min read · docs.inorah.xyz  
Read the article

-   [#csharp](https://hashnode.com/tag/csharp)
-   [#datetime](https://hashnode.com/tag/datetime)
-   [#utc](https://hashnode.com/tag/utc)

## Written by

[shiney](https://hashnode.com/@eddychu)

@eddychu

  
[View profile](https://hashnode.com/@eddychu)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
