My Weather Site

Using AJAX and JSON

Five Day Forecast

Time is given in GMT which is Greenwich Mean Time NOT your local time.

You need to calculate how far you are from GMT. I my case I am in Mountain Time Zone whoch is 6 hours ahead of GMT so if I look at the dt_txt value in the JSPN data and subtract 6 hours, it should be close to my local time. Remember that these are rounded to the nearest 3 hours.

So if I wanted the local wather at noon, I would have to add the time offset in my case 6 hours and I would be looking for weather around 1800.

Read How to add a degree mark to html using javascript.