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

DateAsDate adds timezone #193

Closed
davidspiess opened this issue May 18, 2018 · 2 comments
Closed

DateAsDate adds timezone #193

davidspiess opened this issue May 18, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@davidspiess
Copy link

When i parse a date as DateAsDate, it adds timezone informations from my local computer.
2014-10-27 becomes 2014-10-26, which is wrong. Is there a way to ignore the timezone and calculate it in UTC? I looked for a solution to start node.js in UTC, but this is not possible on windows.

<date>2014-10-27</date>
  {
      type: "element",
      name: "date",
      typeInfo: "DateAsDate"
    }
{ 2014-10-26T23:00:00.000Z originalTimezone: null }
@highsource
Copy link
Owner

Could you maybe post a working example? I'm not quite sure what the best way to solve this would be.

In principle, you can implement and configure your own simple types. Jsonix includes a number of types, but you can easily extend it to your purposes.

@davidspiess
Copy link
Author

I looked into this again, sorry for the delay. The underlying problem is nodejs/node#4230, so i don't think there is anything to do on your side.

@highsource highsource self-assigned this Jul 17, 2018
@highsource highsource added this to the 2.4.2 milestone Jul 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants