你的位置: 码友网首页 / 资讯源列表 / Why Use DateTimeOffset

关于[Why Use DateTimeOffset]的摘要:

Raise your hand if you've stored entity values in a database as DateTime. Ok, everybody has their hand up. You can put your hand down - you look silly doing that while reading an article on some website. Using DateTime for entity properties and database fields is ubiquitous, but if you really care about the time portion of the value, it's often ambiguous. What time zone is the date in? Is it stored as UTC? From everywhere that touches it? How can you be sure? DateTimeOffset provides a solution to this problem.

原文地址: https://ardalis.com/why-use-datetimeoffset/

收录时间: 2022-01-20 浏览量: 184 分类: .NET

| 0 收藏 | 0