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

fix bug 11677 calender (Because of DST.) #12081

Closed
wants to merge 3 commits into from

Conversation

yafengstark
Copy link

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

fix bug issue 11677

deal with DST.(修复个别时区存在夏令时的问题)

Fixed issues

issue 11677

Details

see the commit.

Before: What was the problem?

After: How is it fixed in this PR?

Usage

Are there any API changes?

  • The API has been changed.

Related test cases or examples to use the new APIs

NA.

Others

Merging options

  • Please squash the commits into a single one when merge.

Other information

@echarts-bot
Copy link

echarts-bot bot commented Jan 18, 2020

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

src/coord/calendar/Calendar.js Outdated Show resolved Hide resolved
src/coord/calendar/Calendar.js Outdated Show resolved Hide resolved
@@ -361,6 +361,7 @@ Calendar.prototype = {
* @return {Object} obj
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you wish to use show the structure of range, please do it here in the form of jsdoc.

@@ -0,0 +1,63 @@

<!--
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename this file to be test/calendar-timezone.html because it's hard to know from the issue id directly.

if (date.getDate() !== endDateNum) {
var sign = date.getTime() - range[1].time > 0 ? 1 : -1;
// sign记录调快还是调慢了。三月份那次,
// I only change '>' to '<'.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the comment of I only change '>' to '<'..

var sign = date.getTime() - range[1].time > 0 ? 1 : -1;
// sign记录调快还是调慢了。三月份那次,
// I only change '>' to '<'.
var sign = date.getTime() - range[1].time < 0 ? 1 : -1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why you should change this? What does date.getTime() - range[1].time mean?

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