TGH
TGH

Reputation: 39248

Default timezone for DateTime in asp.Net

What determines the default timezone for a DateTime instance if no timezone is specified. Example: A user living in timezone A visits a webpage hosted on a server in timezone B: If the website code calls ToUniversalTime() on a dateTime instance, will timezone A or timezone B be used as the bases for the calculation?

Thanks in advance

Upvotes: 1

Views: 1995

Answers (1)

SLaks
SLaks

Reputation: 887195

All DateTime operations occur in the server's local timezone, or in UTC.

ASP.Net is completely unaware of the user's time zone.

Upvotes: 4

Related Questions