How to store TimeZoneInfo objects in a database?

后端 未结 4 1192
旧巷少年郎
旧巷少年郎 2021-02-13 07:02

Somewhat misleading title, I know. Never actually wanted to store TimeZoneInfo object themselves: rather, I want to store some culture-neutral identifier, which can

4条回答
  •  感情败类
    2021-02-13 07:24

    check these two methods

    public static System.TimeZoneInfo FromSerializedString(string source)
    public string ToSerializedString()
    

    these should preserve as much info as possible :)

提交回复
热议问题