I have one text-box
with date-time
picker control.While choosing the date_time it is taking current system time.
I want after select it will automatically convert to server time and it should display in the text-box
. Can anyone suggest me how to convert this client time to server time ?
Asked
Active
Viewed 638 times
1

JOJO
- 306
- 2
- 8
- 27
2 Answers
0
Save your time in your server using UTC time (DateTime.UtcNow)
and then depending on the users time zone you will change this utc time. Never save local time in the db

Vignesh Kumar A
- 27,863
- 13
- 63
- 115
0
Check the following thread on how to determine a web user's timezone:

Community
- 1
- 1

Wagner DosAnjos
- 6,304
- 1
- 15
- 29