Convert GMT time to local time
Posted
by
Dibish
on Stack Overflow
See other posts from Stack Overflow
or by Dibish
Published on 2013-10-21T09:50:37Z
Indexed on
2013/10/21
9:53 UTC
Read the original article
Hit count: 206
JavaScript
|sencha-touch
Am getting a GMT time from my server in this format
Fri, 18 Oct 2013 11:38:23 GMT
My requirement is to convert this time to local time using Javascript, eg:/ if the user is from India, first i need to take the time zone +5.30 and add that to my servertime and convert the time string to the following format
2013-10-18 16:37:06
I tried with following code but not working
var date = new Date('Fri, 18 Oct 2013 11:38:23 GMT');
date.toString();
Please help me to solve this issue, Thanks in advance
© Stack Overflow or respective owner