When parsing the JSON, all variables are correct but when converting the epoch to a string like “The time is 19:06 PM, on Thursday, the 29th of December.” it always outputs “The time is 8:06 AM, on Saturday, the 16th of January.”
I’ve even tried inputting a direct epoch time into the function and still get this consistent response. I’ve not used javascript or jQuery or JSON before so sorry if it is a silly mistake.
I’ve posted my code up on jsFiddle so you can see what I mean. Any help is greatly appreciated.
Javascript Unix time uses milliseconds:
That should do it for you. Worked for me!