0

DateTime.Now() is returning server time where application is running on server. I need a way to find Client Machine Time in a Class File in C# without using JavaScript.

Please suggest if there is any workaround for this request.

rene
  • 41,474
  • 78
  • 114
  • 152
Garg Mankush
  • 59
  • 1
  • 6
  • you can try and look [here](https://stackoverflow.com/questions/6323613/time-of-another-machine) – styx Feb 21 '18 at 13:01
  • "Without using JavaScript" suggests you're talking about a web application. In which case, you are going to need to run *some* code on the client machine that communicates the time. You can't run arbitrary C# code on the client machine, so JS is pretty much your only choice. – Jeroen Mostert Feb 21 '18 at 13:01
  • I believe you cannot do that since the codebehind is executed in the server. I thin the only way is to get it using client side script. – John Woo Feb 21 '18 at 13:02
  • 1
    You could also use the `Date` request header. – matthias krull Feb 21 '18 at 13:11

0 Answers0