I was wondering, where does
DateTime.Now;
get its data from?
does it get the data from my desktop? actually it does when i’m observing under debugging. I changed my desktop time back an hour, and the datetime.now gave me the exact same date/time.
My real question is, will this still apply when the project is deployed? Will my site continue to fetch time from the users pcs?
The reason for this question is, because i will be using session variables, which i want to dispose after x minutes. And if datetime.now gets the time from the users computer, then it would be a kind of a security issue.
Thanks in advance for your answer.
ASP.NET runs at the server. It is getting the time at the server. Note that during development, the server often happens to be the “user’s PC”, but that is coincidence.