Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
draw_down
10y ago
0 comments
Save
Share
Yes. But front-end JS takes it to the next level by, for example, not providing any sane way to get the current locale.
0 comments
6 comments · 3 top-level
top
newest
oldest
xlm1717
10y ago
· 2 in thread
Just don't do it on the front-end. Never do it on the front-end.
draw_down
OP
10y ago
You have to. User specifies thing should happen at 2PM, their time, then POSTs that data to your API or whatever. Well, what time are they actually talking about? You need to know.
toomuchtodo
10y ago
You ask the user what time zone they're in? Better to have accurate data then guess.
1 more reply
douche
10y ago
· 1 in thread
Moment.js is a must-have.
nstr007
10y ago
If only we didn't need to add so much to our payload just to handle dates.
ErikAugust
10y ago
getTimezoneOffset()
j
/
k
navigate · click thread line to collapse