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

feat: support additional parameter for optional date timezone #525

Merged
merged 6 commits into from
Mar 9, 2023

Conversation

Scrib3r
Copy link
Contributor

@Scrib3r Scrib3r commented Mar 1, 2023

Description

The current version of the library always puts the timezone symbol Z at every end of date despite that not all soap services support this date format.

I've extended the options parameter for passing the optional date.timezone parameter to XmlHandler and nested functions for using the optional timezone symbol.

The next code is an example of disabling timezones in the date's string:

const handler = new XMLHandler({}, {
  date: {
    timezone: {
      enabled: false,   
  },
});

By default enabled value is true for avoiding breaking changes for the existing API.

Related issues

Checklist

  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style
    guide

src/parser/xmlHandler.js Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Mar 1, 2023

Pull Request Test Coverage Report for Build 4313867057

  • 18 of 19 (94.74%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 84.144%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/parser/xmlHandler.js 18 19 94.74%
Totals Coverage Status
Change from base Build 4278808431: 0.03%
Covered Lines: 2875
Relevant Lines: 3239

💛 - Coveralls

@Scrib3r Scrib3r requested review from achrinza and removed request for raymondfeng March 2, 2023 14:19
@Scrib3r
Copy link
Contributor Author

Scrib3r commented Mar 2, 2023

@achrinza
I don't know how but after the request review, @raymondfeng was removed from reviewers.

@dhmlau dhmlau requested a review from raymondfeng March 4, 2023 14:20
Copy link
Member

@dhmlau dhmlau left a comment

Choose a reason for hiding this comment

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

LGTM

@dhmlau
Copy link
Member

dhmlau commented Mar 4, 2023

@Scrib3r, thanks for the PR. Your PR LGTM. I've added @raymondfeng as reviewer per your request.

@dhmlau dhmlau merged commit 53974ea into loopbackio:master Mar 9, 2023
@dhmlau
Copy link
Member

dhmlau commented Mar 9, 2023

@Scrib3r, thanks again for your contribution. Your PR has been merged! 🎉

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.

5 participants