Quote:
Originally Posted by zreenmkr
How do you refine it to local dateTime? plus able to chose 12hour and 24hour format?
with example above it returns 20:35 which is 08:35PM but my local time is 12:35PM
|
Your original example converts the date into JSON format where the timezone offfset is zero, as denoted by the suffix "Z".
Use JS date object methods to convert it to your desired format.
Code:
www.w3schools.com/jsref/jsref_obj_date.asp