handyfreak / python-weather-api

Automatically exported from code.google.com/p/python-weather-api
MIT License
0 stars 0 forks source link

Weather.com Data mismatches Day of Week for non-EST/EDT locations #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Make an api call to weather.com, such as this:
weathercom = pywapi.get_weather_from_weather_com('94117')
pprint.pprint(weathercom['forecasts'][0])

What is the expected output? What do you see instead?
This correctly shows the next available forecast, however the date, and the day 
of the week do not match. For example, today is Sunday, June 22nd. The returned 
data set looks like this:
{'date': u'Jun 23',
 'day': {'brief_text': u'',
         'chance_precip': u'0',
         'humidity': u'0',
         'icon': u'',
         'text': u'',
         'wind': {'direction': u'0',
                  'gust': u'N/A',
                  'speed': u'calm',
                  'text': u'CALM'}},
 'day_of_week': u'Sunday',
 'high': u'12',
 'low': u'11',
 'night': {'brief_text': u'P Cloudy',
           'chance_precip': u'10',
           'humidity': u'90',
           'icon': u'29',
           'text': u'Partly Cloudy',
           'wind': {'direction': u'255',
                    'gust': u'N/A',
                    'speed': u'20',
                    'text': u'WSW'}},
 'sunrise': u'5:49 AM',
 'sunset': u'8:35 PM'}

Note how the forecast is for tomorrow, June 23rd, 2014, but the day of the week 
is listed as Sunday. These do not match. June 23rd is a Monday. I don't know if 
I should believe the day of the week, or the date.

What version of the product are you using? On what operating system?
v0.3.8 on Debian Linux. Python version 2.7

Original issue reported on code.google.com by JeremyEBlum on 23 Jun 2014 at 5:32

GoogleCodeExporter commented 9 years ago
This is an issue with the data received from Weather.com's feed, it appears 
that the date (XML tag 'dt') is incorrect for US locations not in EDT/EST:

http://wxdata.weather.com/wxdata/weather/local/60007?unit=m&dayf=5&cc=*

Original comment by jtas...@gmail.com on 4 Jul 2014 at 5:05

GoogleCodeExporter commented 9 years ago
Note that this issue only persists between midnight EST/EDT until midnight in 
the timezone of the specified location.

Original comment by jtas...@gmail.com on 4 Jul 2014 at 5:10