-
Notifications
You must be signed in to change notification settings - Fork 182
Remove String manipulations of Date objects #268
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
Conversation
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
Can one of the admins verify this patch? |
2 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
@slnode test please |
@bbito Could you please rebase your branch and fix the commit message? The format for commit messages:
|
@bbito Sorry, do not worry about the rebase. I was able to do that for you :) |
@ssh24 Oh no! |
@ssh24 is there an easy way I can back-out this mess? |
@bbito Let me see if I can fix this. |
@ssh24 Thanks a bunch! I thought the rebase was going weird - perhaps because we were both doing it at the same time... |
@bbito I gave it a try but the commit log looks very messy and quiet impossible to rebase it at this point. I also do not remember your changes hence cherry picking it into new commit is becoming difficult. Do you mind creating a new PR? |
@ssh24 I'm willing to do it, but I need a little direction! At this point can I make a new branch and bring that to upstream/master, make the edits to mysql.js and then make a single commit? |
Yes that should work. Please make sure to rebase against Also as a side note: I suggest community members to not use their master branch to submit PR's. It is good practice to create branches of master and committing work on that. Forked master branch should be used to keep codebase synced with the |
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
Can one of the admins verify this patch? |
2 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Description
Pull Request requested by @kjdelisle regarding #149 following my proposed solution "A" at #149 (comment).
As mentioned in the post linked above, this change allows the underlying mysqljs/mysql module to handle Date object serialization and removes the forced conversion of Dates to UTC Strings. An opt-out fallback to forced coercion to UTC is included, which was modeled after #265 from @darknos .
Previously timezone values specified in datasources.json had no effect on the underlying mysqljs/mysql module because Loopback was converting the Dates to Strings before handing off to the driver module.
With this change, timezone values specified in datasources.json provide the expected behavior only if "legacyUtcDateProcessing" is explicitly set to
false
in datasources.json, e.g."legacyUtcDateProcessing": false
This PR was made under conditions spelled out in the related issue thread #149 that I have limited time and expertise as a contributor and do not plan to personally address the test creation and documentation outlined in the action plan from @bajtos as pertains to this correction of long-standing undocumented forced coercion of Date types to UTC.
Please label:
breaking-change
,bug
as per #149Related issues
Checklist
guide