I develop a coupon application using javascript, am new to this. I need to get the current date and time for given lat and long position in javascript. Anybody know,kindly suggest me. Thanks
Asked
Active
Viewed 2,631 times
3
-
I'd suggest using `getUTCTime()` (see [MDN's `Date()`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date)), and then using an offset. – David Thomas Sep 07 '12 at 07:26
-
The askers problem here is determining THE offset using lat and long :) – aorcsik Sep 07 '12 at 07:26
-
Hope it helps http://stackoverflow.com/questions/222309/calculate-last-day-of-month-in-javascript – Mayank Pathak Sep 07 '12 at 07:29
1 Answers
2
Perhaps, determine the timezone (see Timezone lookup from latitude longitude) and translate the current UTC time?

Community
- 1
- 1

Alexander Pavlov
- 31,598
- 5
- 67
- 93