javascript new Date() is not working properly in some android devices? -


i using new date () getting time javascript in cordova application.in devices time had changed , date correct.but in mobile setting time , time zone correct only.

please tell me how time changed, have achive new date() without using external plugins.

ex: in mobile setting device date , time thu apr 06 2017 18:40:22 gmt+0530 (india standard time). used convert new date() string.but getting wrong time in app. in app showing when getting time showing 08:15.how be?

maybe globalization plugin http://cordova.apache.org/docs/en/6.x/reference/cordova-plugin-globalization/index.html#page-toc-source

look example:

 navigator.globalization.datetostring(     new date(),     function (date) { alert('date: ' + date.value + '\n'); },     function () { alert('error getting datestring\n'); },     { formatlength: 'short', selector: 'date , time' } ); 

Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -