Convert Javascript Date from UTC to Local Timezone
var strdate = ‘2013/05/03 03:13:00’;
var d = new Date(strdate);
var d = new Date(d.getTime() – d.getTimezoneOffset() * 60 * 1000);
used it with Titanium Appcelerator
Tags: appcelerator, Date, getTimezoneOffset, javascript, local, timezone, utc
Trackback from your site.
REST API Basics in Java
| #
Awesome post. Appreciate your hardwork
I have an issue with date in my project. From Back end java code, i am sending date to front end,
In front end i am comparing current client browser time to back end date,
For this i am having lot of issues.
so i tried to do both back end and front end dates as UTC date
My Back end date is ‘Tue May 21 2013 07:01:41’
and Front end date in js is ‘Tue, 21 May 2013 06:57:39 GMT’ using now.toUTCString() function.
How can i remove GMT in front end using java script?
Thanks
Grep Command Examples in Linux/Unix