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

Date picker is inconsistent (and sometimes wrong) #112

Closed
iffy opened this issue Apr 25, 2018 · 4 comments
Closed

Date picker is inconsistent (and sometimes wrong) #112

iffy opened this issue Apr 25, 2018 · 4 comments
Labels
bug Things that prevent or seriously impede people from doing their budget. included in next release The work is done, it's just waiting to be released. papercut Annoying things
Milestone

Comments

@iffy
Copy link
Contributor

iffy commented Apr 25, 2018

No description provided.

@iffy iffy added this to the v1.0.0 milestone Apr 25, 2018
@iffy iffy added bug Things that prevent or seriously impede people from doing their budget. included in next release The work is done, it's just waiting to be released. papercut Annoying things labels Apr 25, 2018
@iffy
Copy link
Contributor Author

iffy commented Apr 25, 2018

Imported from https://trello.com/c/bDbNumyY

  • copy over comments

@iffy iffy added this to Included in next version in Buckets Roadmap Apr 25, 2018
@iffy iffy added the included in next release The work is done, it's just waiting to be released. label Apr 25, 2018
@iffy
Copy link
Contributor Author

iffy commented Apr 26, 2018

Not completely solved:

...when it’s on the evening for me (China) and I validate some posted date, it will register that date -1.
For example, if I register something today : I pick 26th on date picker, when I validate it will register as 25th…

From the logs:

(main) Local time: 2018-04-18T09:19:14-05:00
(main)   UTC time: 2018-04-18T14:19:14Z
(main) Timezone: America/Chicago
(budget.r)   localNow(): 2018-04-18T09:19:16-05:00
(budget.r)     utcNow(): 2018-04-18T14:19:16Z
(budget.r)          toString: Wed Apr 18 2018 22:19:16 GMT+0800 (CST)
(budget.r)    toLocaleString: 4/18/2018, 10:19:16 PM
(budget.r) getTimezoneOffset: -480
(budget.r) moment: 2.18.1
  • moment guesses that the timezone is America/Chicago which is UTC-5 or UTC-6
  • getTimezoneOffset is -8 (-480/60) (the sign on this is backward)
  • toString() reports the timezone as CST (China Standard Time) which is +8

So I guess the problem is that moment guesses that CST is Central Standard Time (in the US) instead of China?

@iffy
Copy link
Contributor Author

iffy commented Apr 26, 2018

I think this is related: moment/moment-timezone#517

@iffy
Copy link
Contributor Author

iffy commented Apr 30, 2018

Included in v0.42.0 release (AUTOMATED COMMENT)

@iffy iffy closed this as completed Apr 30, 2018
Buckets Roadmap automation moved this from Included in next version to Done Apr 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Things that prevent or seriously impede people from doing their budget. included in next release The work is done, it's just waiting to be released. papercut Annoying things
Projects
Development

No branches or pull requests

1 participant