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

Date time parsing issue #5

Open
wklogoo opened this issue Jun 9, 2016 · 5 comments
Open

Date time parsing issue #5

wklogoo opened this issue Jun 9, 2016 · 5 comments

Comments

@wklogoo
Copy link

wklogoo commented Jun 9, 2016

Currently, the UTC date time in a GPX file is not parsed with UTC time zone.

A suggestion is to use the python-dateutil and replace the current parsing approach with dateutil.parser.

import dateutil.parser

def datetime_iso(string):
"""Parse an ISO formatted string. E.g:
2006-01-08T06:45:07Z
Modified by W. K. Lo 2016-06-09

Return a datetime object.
"""
dt = dateutil.parser.parse(string)
return dt

Hope this fit with other parts well!

Regards,
wklogoo

@wklogoo
Copy link
Author

wklogoo commented Jun 9, 2016

Sorry, I am new to GitHub. Not familiar with the formatting effect (and the preview button) of the text in the post.

This is a really nice piece of gpx module for python!

== repost for easy viewing ==

Currently, the UTC date time in a GPX file is not parsed with UTC time zone.

A suggestion is to use the python-dateutil and replace the current parsing approach with dateutil.parser.

import dateutil.parser

def datetime_iso(string):
 """Parse an ISO formatted string. E.g:
 2006-01-08T06:45:07Z
 Modified by W. K. Lo 2016-06-09
Return a datetime object.
"""
dt = dateutil.parser.parse(string)
return dt

Hope this fit with other parts well!

Regards,
wklogoo

@fxdgear
Copy link
Owner

fxdgear commented Aug 8, 2016

@wklogoo

Thanks for the suggestion.

Can you create a PR? If you need help on how to do that let me know.

Thanks

@wklogoo
Copy link
Author

wklogoo commented Aug 9, 2016

What is a PR? Please suggest some online materials for reference on the
operation process of GitHub. Thx.

On Tue, Aug 9, 2016 at 1:25 AM, Nick Lang [email protected] wrote:

@wklogoo https://github.com/wklogoo

Thanks for the suggestion.

Can you create a PR? If you need help on how to do that let me know.

Thanks


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#5 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AS663z9reJQK9_rt1bkm0ZnldYEMEEwoks5qd2ZugaJpZM4IyDIS
.

Regards,
W. K. Lo

@fxdgear
Copy link
Owner

fxdgear commented Aug 9, 2016

PR = pull request.

You can fork this repo under your namespace. Create the change you want. Commit it to your repo.

Then you can create a PR from you're fork onto my repo.

Then I can review and submit feedback/accept it.

And merge your change set in to this Repo.

@mr337
Copy link

mr337 commented Aug 16, 2016

@wklogoo https://www.thinkful.com/learn/github-pull-request-tutorial/ might help!

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

No branches or pull requests

3 participants