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

Record peoples' timezones #2278

Open
jywarren opened this issue Feb 8, 2018 · 7 comments
Open

Record peoples' timezones #2278

jywarren opened this issue Feb 8, 2018 · 7 comments
Labels
enhancement explains that the issue is to improve upon one of our existing features help wanted requires help by anyone willing to contribute JavaScript Ruby

Comments

@jywarren
Copy link
Member

jywarren commented Feb 8, 2018

We should record peoples' time zones automatically because we're going to need to:

This has some guidance on this: http://nithinbekal.com/posts/rails-user-timezones/

I was hoping we could do this initially with a button on the profile page, that detects time zone and saves it as a profile tag like timezone:-06:00 or timezone:+4:30 which we could parse for later use.

On the profile page, we should be able to use addTag(tagname):

<a class="btn btn-sm btn-default" href="javascript:void()" onClick="addTag('difficulty:<%= tag %>');$('.quiz .difficulty').hide()"><%= tag %></a>

Later, we would want to add a follow-up issue of using the timezone tag in https://github.com/publiclab/plots2/blob/master/app/views/tag/rss.rss.builder to set the default timezone, using Ruby time zone methods:

http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html#method-i-iso8601

@jywarren jywarren added enhancement explains that the issue is to improve upon one of our existing features help wanted requires help by anyone willing to contribute JavaScript Ruby labels Feb 8, 2018
@amitsin6h
Copy link
Member

want to work on this issue as no first-timer-only found. @jywarren

@grvsachdeva
Copy link
Member

hi @amitsin6h you can take this issue or you can see here for fto candidate(they are close to first-timer issue).

@amitsin6h
Copy link
Member

@Gauravano also most of the fto issues are also taken

@grvsachdeva
Copy link
Member

If you can solve this one that would be great !!

@f3mshep
Copy link
Contributor

f3mshep commented Feb 15, 2018

@amitsin6h Are you still looking into this? Would you be interested in pair programming if you are stuck?

@amitsin6h
Copy link
Member

@f3mshep yeah sure. I have some issues also , I can also discuss with you.

@jywarren
Copy link
Member Author

Hi, all -- let's try to solve this in a new controller method in the users_controller, something like def timezone -- where we could use code similar to this to create the user tag in the format above:

https://github.com/publiclab/plots2/blob/master/app/controllers/user_tags_controller.rb#L19-L26

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement explains that the issue is to improve upon one of our existing features help wanted requires help by anyone willing to contribute JavaScript Ruby
Projects
None yet
Development

No branches or pull requests

4 participants