Problems with the Now() function in a Galaxy J7 Pro

I have been working without problems with the Now () or Now function, which returns the current date and time, both on the web and on a Hisense mobile with Android 6, however when I try this on a Galaxy J7 Pro (Android 7), I puts the date equivalent to UTC in the application, the date of the equipment is correct but the date of mobile is not, let’s say that I need in the system the date and time as UTC-6 (Mexico City) or that it works correctly Now () as Does it on the web or on Hisense Mobile, is it possible?


You didn’t mention if you were working in BASIC or JavaScript - but in either case, the purist way to get the system date is this:

date = new Date()
Wed Mar 07 2018 09:36:24 GMT-0500 (EST)

It should work the same way across all devices.

I already tried as indicated and the problem persists in the galaxy mobile, the web is working ok

I think it is already there, the key was to convert everything to UTC, later to date and finally subtract 6 hours, with this I assure you that it does not matter the type of mobile, in all it will work since it is based on UTC, I’m still testing, for so far it has worked without problems.