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

0003 timezone conversion #4

Merged
merged 4 commits into from
Oct 16, 2017

Conversation

sanchezg
Copy link
Contributor

This PR adds timezone conversion addressed by the tz parameter as asked in #3

Also I:

  • added a logger method, please use it instead printing to stdout.
  • fixed some pep8 issues and minor code style

To test this PR:

import requests

base_url = 'http://localhost:5000/'  # Change it to your settings
api_args = "?sign={sign}&day={day}&tz={timezone}"
req = requests.post(base_url + api_args.format(sign='aries', day='today', timezone='Japan'))

print req.text  # Should print for 'tomorrow'

Copy link
Owner

@sameerkumar18 sameerkumar18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! (Just had to remove the dot while importing util )

@sameerkumar18 sameerkumar18 merged commit 6b53065 into sameerkumar18:master Oct 16, 2017
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

Successfully merging this pull request may close these issues.

2 participants