jbryant04
Set Browser Timezone in Pow Session
I’m trying to add the user’s timezone whenever they visit the app for a calendar of events I’m building in liveview. I can get the the timezone just fine in the browser but am stuck with how to add it to the session. Is this just an ajax post to a route which updates the session?
Marked As Solved
kip
ex_cldr Core Team
As a consumer I really dislike apps that assume anything about my preferences based upon browser environment. I would always prefer there is a preference for me to set, with perhaps the default being the browsers timezone.
That aside, yes, you would need to send a request via a Phoenix channel, an Ajax call or possibly a live view hook in order for it to be added to the session if you intend to keep track of it.
2
Also Liked
jbryant04
Popular in Discussions
Are there any Elixir or Erlang libraries that help with this? I’ve been thinking how streaming services like twitch have exploded recentl...
New
Erlang :list.nth simple, but 1 - based
nth(1, [H|_]) -> H;
nth(N, [_|T]) when N > 1 ->
nth(N - 1, T).
Elixir Enum.at … coo...
New
In general I’ve been sticking to this community style guide GitHub - christopheradams/elixir_style_guide: A community driven style guide ...
New
Phoenix Live View is now publicly available on GitHub.
Here’s Chris McCord’s tweet announcing making it public.
New
Hello Elixir and Nerves community,
I have been working for a while on an open-source embedded key-value database for Elixir, that I call...
New
What configs will make sense to put to runtime.exs?
–
A bit of how I configure apps:
I have generic configs in config/config.exs,
dev...
New
What learn first? Rust or Elixir
Hi Elixir community!
I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
Other popular topics
Hi,
I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
Hi everyone!
I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
New
Credo is smart enough to check for (something like) this:
assert length(the_list) == 0
with this response:
Checking if an enum is empt...
New
After calling mix ecto.create I get this error:
17:00:32.162 [error] GenServer #PID<0.412.0> terminating
** (Postgrex.Error) FATAL...
New
Latest Phoenix Threads
Chat & Discussions>Discussions
Latest on Elixir Forum
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









