javascript:
function calcTime(offset)
{
d = new Date();
utc = d.getTime() + (d.getTimezoneOffset() * 60000);
nd = new Date(utc + (3600000*offset));
document.getElementById('result').value=nd.toLocaleString();
}
Html:
This works on value change... but i want to save value as
but the it is not working if i write PST etc.. What can i do??
Please help
Abc ThakurPosted Feb 9, 2015, 7:05 AM
keyurPosted Feb 9, 2015, 7:00 AM
So make common function and pass value "PST","EST" and fetch its offset.
hope this helps
Abc ThakurPosted Feb 9, 2015, 6:55 AM
keyurPosted Feb 9, 2015, 6:51 AM
Can you tell what happen any error you got?