zebpalmer / WeatherAlerts

Python script to parse the National Weather Service 'Cap' Alerts Feed and do interesting things with it.
MIT License
31 stars 14 forks source link

Represent timestamps as datetime objects #11

Closed JacobHenner closed 5 years ago

JacobHenner commented 6 years ago

Resolves the TODO in alert.py, adds datetime support to _ts_parse()

zebpalmer commented 6 years ago

Thanks for PR, I'll happily merge this, but it's failing builds in 2.7. fix that and I'll merge.

ValueError: 'z' is a bad directive in format '%Y-%m-%dT%H:%M:%S%z'

also, this hasn't been touched in ages, I'm amazed it works.

JacobHenner commented 6 years ago

Sounds good, I'll try to fix sometime tomorrow. Thanks!

JacobHenner commented 6 years ago

Fixed to accommodate both Python 2 and Python 3. datetime objects are set as UTC.

JacobHenner commented 6 years ago

This should be good, now.

JacobHenner commented 5 years ago

Would still love to see this merged in if you're interested :smiley: