Invalid data

66 views
Skip to first unread message

Henry Wright

unread,
May 7, 2015, 6:17:55 AM5/7/15
to metoffice...@googlegroups.com
I'm using the site-specific 3 hourly forecast product and am wondering if anyone else has noticed the date of the day represented isn't a valid date? The date is provided in ISO 8601 format like this 2014-02-04Z. Problem is, that isn't valid according to the spec:


"Z" relates to time and there's no time provided.

Creating a JavaScript date instance from something like 2014-02-04Z causes problems in FireFox, IE and Safari (but it does work Chrome). View this demo in Chrome and then again in FireFox for an example of what I mean:


The Met Office Support Desk directed me to these support forums but I think this is a bug with the data.

MetOffice DataPoint

unread,
May 19, 2015, 7:56:10 AM5/19/15
to metoffice...@googlegroups.com, henry...@gmail.com
Hi Henry, I hope I can help, although I am not a coder myself!

I am not aware this is a problem. But looking through the documentation the example URL which would call all sites for a particular time is shown as follows. As the data is provided in 3 hourly timesteps you have to provide a time.

Example: to obtain forecasts for every location in the UK at a particular time in XML format:

http://datapoint.metoffice.gov.uk/public/data/val/wxfcs/all/xml/all?res=3hourly&time=2011-11-10T18Z&key=<API key>

I believe you can put a from and to for the times steps, but not sure how.

I have looked at the daily forecast documentation as I was expecting that to show me how to represnet the date and that suggests that you can request a specific time aswell, which I don't think is right. So I will raise an incident and ask them to update the documentation and provide an answer in this group.

Until then can anyone else advise?

Clare

Henry Wright

unread,
May 19, 2015, 8:08:59 AM5/19/15
to metoffice...@googlegroups.com, henry...@gmail.com
Hi Clare,

Thanks for your reply. I can work around the problem at my end so there's nothing I really need in the way of advice. I opened the topic more of a bug report for your benefit. To my best knowledge, the format of the date you are outputting isn't valid. This will cause developers problems if they're doing any kind of client side manipulation on that date. Unfortunately, there's nothing anyone external to Met Office can do about it.

Hope that info helps.

Henry

MetOffice DataPoint

unread,
May 19, 2015, 9:20:38 AM5/19/15
to metoffice...@googlegroups.com, henry...@gmail.com
Ok, that makes more sense as to what the problem is.

I have raised an incident to get someone to look into it.

Thanks
Clare
Reply all
Reply to author
Forward
0 new messages