Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I believe DateTime gives the time of the local internet hub not the actual host computer.

VB
DateTime.Now.ToString("HH:mm:ss")


How would I get the local time of the host computer?
Posted
Comments
phil.o 12-Feb-14 8:53am    
Where did you get this assumption from?

DateTime.Now will return you the DateTime from the Web Server Host!
 
Share this answer
 
Comments
teledexterus 12-Feb-14 8:57am    
How do you get the time of the local computer?
Raul Iloc 12-Feb-14 9:00am    
The DateTime returned is the local date time of the web server!
dharam1 12-Feb-14 9:01am    
If you want to get time of client machine then use the javascript Date class .
DataTime.Now executes at the server so you get server time. Or else need to have client scripts to fetch the Client machine time.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900