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

Added support for setting a targetTimeZone. #42

Closed
wants to merge 2 commits into from

Conversation

dntlktshrths
Copy link

Added support for setting a targetTimeZone using the 'options.scales[scaleId].adapters.date.targetTimeZone' property.

Added support for setting a targetTimeZone using the 'options.scales[scaleId].adapters.date.targetTimeZone' property.
Added support for setting a targetTimeZone.
@coveralls
Copy link

coveralls commented Sep 14, 2021

Pull Request Test Coverage Report for Build 1234034153

  • 2 of 3 (66.67%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-2.2%) to 70.492%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/index.js 2 3 66.67%
Totals Coverage Status
Change from base Build 1123756578: -2.2%
Covered Lines: 25
Relevant Lines: 33

💛 - Coveralls

1 similar comment
@coveralls
Copy link

Pull Request Test Coverage Report for Build 1234034153

  • 2 of 3 (66.67%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-2.2%) to 70.492%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/index.js 2 3 66.67%
Totals Coverage Status
Change from base Build 1123756578: -2.2%
Covered Lines: 25
Relevant Lines: 33

💛 - Coveralls

@kurkle
Copy link
Member

kurkle commented Sep 14, 2021

Filename Size Change
dist/chartjs-adapter-luxon.esm.js 980 B +50 B (+5%) 🔍
dist/chartjs-adapter-luxon.js 1.11 kB +47 B (+4%)
dist/chartjs-adapter-luxon.min.js 872 B +39 B (+5%) 🔍

@stockiNail
Copy link
Contributor

stockiNail commented Sep 14, 2021

@dntlktshrths @kurkle maybe I'm wrong and please correct me.

The zone could be set in the options, setting zone option in options.scales[scaleId].adapters.date.zone.

@kurkle
Copy link
Member

kurkle commented Sep 14, 2021

@stockiNail I haven't used this adapter that much, so I have no idea. The options are passed to the format function, if it works that way, yhen you are most likely right.

@stockiNail
Copy link
Contributor

I have created a codepen.

https://codepen.io/stockinail/pen/rNyYapz

The time is set to America/Los_Angeles time zone.

Chartjs: 3.5.1
Luxon: 2.0.2
Luxon Adapter: 1.10

@stockiNail
Copy link
Contributor

AFAIK (because I haven't checked again in new version of Luxon) the options that you can set to the adapter should be:

  • locale (tested)
  • zone (tested)
  • outputCalendar (not tested yet)
  • numberingSystem (not tested yet)

@dntlktshrths
Copy link
Author

@stockiNail Thank you for your time and input! This is even easier. Yes, the options.scales[scaleId].adapters.date.zone setting does exactly what I was looking for. I will close this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants