c# - UTC DateTime back to Original datetime -


i have stared @ long...

i have third-party datepicker (asp/mvc) , stringify array of selected dates , pass controller.

example:

  • my browser est time zone.
  • i select 5/21/2013
  • when stringify ["2013-05-21t04:00:00z"] (utc)
  • i pass webserver in pst timezone
  • i want 5/21/2013 12:00:00am

i know meant midnight since timeless datepicker.

in c#, how convert original time? in pst should not matter.

try

string date = "2013-05-21t04:00:00z" ; datetime dt = datetime.parse(date); dt = dt.date; 

you date component only, time component midnight. hope satisfies requirement.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -