Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the timestamps in comments be ISO8601 formatted rather than current format #7

Open
yuvipanda opened this issue Dec 19, 2015 · 2 comments

Comments

@yuvipanda
Copy link
Contributor

I've had good success with datetime.strptime(sec.children[0].value.timestamp.strip(), "%H:%M, %d %B %Y (%Z)")

@kjschiroo
Copy link
Collaborator

I'm going to hold off on implementing this one until I get some more feedback on #15

@yuvipanda yuvipanda changed the title Make the timestamps in comments be datetime objects instead of str Make the timestamps in comments be ISO8601 formatted rather than current format Jan 14, 2016
@yuvipanda
Copy link
Contributor Author

Modified title to fit new reality! Also this code works fine for me to convert to datetime:

def parse_time(time):
    time = time.replace(' Jun ', ' June ')
    return datetime.strptime(time.strip(), "%H:%M, %d %B %Y (%Z)"),

Since almost all months are unabreviated except June (WTF?!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants