1

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 ?

JOJO
  • 306
  • 2
  • 8
  • 27

2 Answers2

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

MSDN

Vignesh Kumar A
  • 27,863
  • 13
  • 63
  • 115
0

Check the following thread on how to determine a web user's timezone:

Determine a User's Timezone

Community
  • 1
  • 1
Wagner DosAnjos
  • 6,304
  • 1
  • 15
  • 29