Time between Time Zones and Code Behind

MTSkull

Centurion
Joined
Mar 25, 2003
Messages
151
Location
Boulder, Colorado
I have an asp application with c# code behind which will be used to collect user entered data from all over the place. I am going to stamp the data with...
Code:
 string.Format("{0: yyyy-MM-dd H:mm} MST", DateTime.Now);
This is going to happen in the code behind at the server. So the question is, will the stamp be the local time at the server, or the local time for the end user?

I tried to set up an experiment but it was less the successful.

Thanks
MTS
 
It should be the server's time as the code is running on the server. Not sure what you meant by "less than successful" though - did it not match with a particular time?
 
Just noticed that I failed to respond to this sorry. The "less then successful" was user error. I verified that the server uses local time. I just mis-adjusted the test PC's time and ran the function.
 
Back
Top