DateTime Unspecified Kind

No, Unspecified and UTC are very different – the page you’re quoting from is from ToLocalTime. The point is that if you call ToLocalTime using an “unspecified” DateTime, then the value will be treated as if it were in UTC.

Likewise if you call ToUniversalTime using an “unspecified” DateTime, then the value will be treated as if it were in the system local time zone.

Frankly this sort of thing is why I dislike DateTime rather a lot. If I were you, I’d use Noda Time instead, which separates the concepts out into different types entirely, removing a lot of the confusion. (There are more types to know about, but each one represents a single concept.) I’m clearly biased though…

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)