How to convert UTC to local time in Javascript?

Where can I find a Javascript function that can convert UTC to local date and time?

  • Currently I'm working with this format, 2014-03-31 21:52:49. I can alter this format if need be. It would be nice to find a function that will accept my format the way it is and ...show more

  • Answer:

    Are you using Date()? Why not Date.toLocalelFormat()? var myDate = new Date(); alert(myDate.toLocaleFormat());

YIYRZAZVBG2OTCH2BRQQDU3D2I at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

I have never used but see if http://phpjs.org/functions/date/ works for you

Toxin

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.