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

Construct this.date after determining components #2451

Merged
merged 2 commits into from May 13, 2017

Conversation

Projects
None yet
3 participants
@jamesmontalvo3
Copy link
Contributor

jamesmontalvo3 commented May 8, 2017

This PR is made in reference to: #2440 (Pull requests used for troubleshooting: #2441, #2443)

This PR includes:

Prior to this commit, this.date was constructed with just the year and then used setXYZ() methods (e.g. setMonth(), setDate()) to update the date as required based upon other values. This was causing bad dates as noticed in SemanticResultFormats eventcalendar format, where events showed up approximately a year in the past. This commit changes it so this.date is constructed with the full date information rather than being updated one component at a time.

  • Tests (unit/integration)
  • CI build passed
Construct this.date after deterimining components
Prior to this commit, this.date was constructed with just the year and
then used setXYZ() methods (e.g. setMonth(), setDate()) to update the date
as required based upon other values. This was causing bad dates as noticed
in SemanticResultFormats eventcalendar format, where events showed up
approximately a year in the past. This commit changes it so this.date is
constructed with the full date information rather than being updated one
component at a time.
@mwjames

This comment has been minimized.

Copy link
Contributor

mwjames commented May 10, 2017

@jamesmontalvo3

This comment has been minimized.

Copy link
Contributor Author

jamesmontalvo3 commented May 10, 2017

So you're saying basically anywhere in this file where getMonth is used it should be replaced with getUTCMonth? (and similar replacements for other time components)

@jamesmontalvo3

This comment has been minimized.

Copy link
Contributor Author

jamesmontalvo3 commented May 12, 2017

I made the changes I believe were required, and datatables and eventcalendar are working:

Eventcalendar working:
image

Datatables working:
image

@mwjames

This comment has been minimized.

Copy link
Contributor

mwjames commented May 13, 2017

I made the changes I believe were required, and datatables and eventcalendar are working:

Thanks for the confirmation.

I'm glad that we found a solution with the help of the various parties involved especially given that issue presented or better shrouded itself obscure under certain conditions.

@mwjames mwjames merged commit 0103cb3 into SemanticMediaWiki:master May 13, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jamesmontalvo3 jamesmontalvo3 deleted the jamesmontalvo3:timefix branch May 13, 2017

@jamesmontalvo3

This comment has been minimized.

Copy link
Contributor Author

jamesmontalvo3 commented May 13, 2017

Will this be pulled into the 2.5.x branch and given a tag? It seems like it should since it's a fix to a bug in 2.5.x. Thanks for everything!

@mwjames

This comment has been minimized.

Copy link
Contributor

mwjames commented May 13, 2017

Will this be pulled into the 2.5.x branch and given a tag?

Later in the day I'll prepare a back-port in order for it to be deployable with 2.5.2.

@jamesmontalvo3

This comment has been minimized.

Copy link
Contributor Author

jamesmontalvo3 commented May 13, 2017

Thanks!

@kghbln

This comment has been minimized.

Copy link
Member

kghbln commented May 13, 2017

Later in the day I'll prepare a back-port in order for it to be deployable with 2.5.2.

Cool, I could do the release early next week.

@mwjames

This comment has been minimized.

Copy link
Contributor

mwjames commented May 13, 2017

Back-ported to 2.5.x with 8a9bef2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.