0

1) What is the difference between TimeZoneName and TzId properties of IDateTime inside Ical.Net.Interfaces.DataTypes? 2) Where can I find complete list for both TimeZoneName and TzId ?

Priyank Kotiyal
  • 241
  • 2
  • 13

1 Answers1

0

What is the difference between TimeZoneName and TzId properties of IDateTime inside Ical.Net.Interfaces.DataTypes?

TimeZoneName returns the value of TzId. It's a historical artifact; I consider it deprecated. I may remove it at some point.

Where can I find complete list for both TimeZoneName and TzId

TzId is a mutable property, but assigned values should represent one of the time zones available in NodaTime, which ical.net uses under the hood. These are the tzdb (IANA), BCL (Windows) and serialization databases.

If you want to enumerate all of the values in each time zone database, have a look at this gist for inspiration. (Additional questions about NodaTime should be asked separately. NodaTime internals have nothing to do with ical.net.)

rianjs
  • 7,767
  • 5
  • 24
  • 40
  • Ok. Just want to ask that I am getting "Asia/Calcutta" for india but list at https://gist.github.com/jrolstad/5ca7d78dbfe182d7c1be has "Asia/Kolkata". And I am getting "US/Pacific" also but its not in the list. I am getting the timezones mentioned in list but I am also getting timezones which are not in list like US states strings like US/Eastern and GTM-06 in tzId property. – Priyank Kotiyal Feb 01 '18 at 04:47
  • Calcutta is sometimes Kolkata in the tzdb (IANA) database. US/Pacific is in the serialization database. – rianjs Feb 01 '18 at 22:52