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

Add timezone parameter #3

Closed
sameerkumar18 opened this issue Oct 1, 2017 · 9 comments
Closed

Add timezone parameter #3

sameerkumar18 opened this issue Oct 1, 2017 · 9 comments

Comments

@sameerkumar18
Copy link
Owner

The timezone of the source for the info on the server side is set to "America/New_York, GMT-0400".
It would be great if we could have one parameter for the timezone as there are many users of this API from various parts of the globe.
Example -
POST: https://aztro.herokuapp.com?sign= <sign> &day= <day> &tz= <GMT_Timezone>

We can consider the standard timezone as GMT and enable this conversion just for "day=today"

@sanchezg
Copy link
Contributor

sanchezg commented Oct 1, 2017

So, let me see if I understand this ... you want to make a POST using your local timezone, and the server must convert it to GMT-4 and return you the right results...

Sounds a good enhancement, can I take this?

@sameerkumar18
Copy link
Owner Author

Yes sure go ahead!
Basically, we need to match the timezone of the server with the one given through the parameters.
And please make the timezone parameter optional so that the current users of the API are not affected :)

@sameerkumar18
Copy link
Owner Author

@sanchezg Are you doing this? Any update?

@sanchezg
Copy link
Contributor

sanchezg commented Oct 9, 2017

@sameerkumar18 sorry for the delay! I will be working today on this issue if it is ok, because I was very busy.
Thanks and sorry.

@sameerkumar18
Copy link
Owner Author

@sanchezg No problem! Do whenever you're free :)

@sanchezg
Copy link
Contributor

sanchezg commented Oct 9, 2017

@sameerkumar18 one question: the only possible values for day attribute are "today", "tomorrow" and "yesterday" ? Is that right?

@sameerkumar18
Copy link
Owner Author

Awesome work @sanchezg
But I think this may need a bit more work. When a timezone requested(other than America/New_York) has the day param as 'tomorrow' or 'yesterday', the API still returns the response for 'today'.

For example - http://aztro.herokuapp.com/?sign=aries&day=tomorrow&tz=America/Anchorage
A POST request to this returns response for today i.e. 15th Oct in Anchorage instead of 16th Oct

Hope someone can fix this too :)

@sameerkumar18
Copy link
Owner Author

Closing due to inactivity. Please reopen if necessary :)

@inthernar
Copy link

Was TimeZone support added?
I tried adding the $tz parameter but it didn't work.
I looked in the white pages, they were not updated to include the TZ parameter.

I am currently trying to figure out a way to calculate the differential between the server time and device local time, then adjusting &day to be either today, tomorrow, yesterday...

Would be a lot nicer if this was done on the server lol. Thank you in advance :)

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

3 participants