-
Notifications
You must be signed in to change notification settings - Fork 115
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
Timezone is not considered in MarshalText method #113
Labels
Comments
Would you accept a PR? I'd like to fix this bug. |
Yes, please file a PR. Thanks for reporting this! |
shmsr
added a commit
to shmsr/go-xml
that referenced
this issue
Aug 21, 2020
Fixes: droyo#113 This issues fixes the method xsdDateTime.MarshalText by adding the support for considering the timezone offset when marshalling. Previously it dropped the offset.
shmsr
added a commit
to shmsr/go-xml
that referenced
this issue
Aug 21, 2020
Fixes: droyo#113 This commit fixes the method xsdDateTime.MarshalText by adding the support for considering the timezone offset when marshalling. Previously it dropped the offset.
@droyo I've added a commit that fixes this bug. Could you please review it? And really sorry for being this late. |
@droyo Did you get a chance to review this? This is just a reminder! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code block is taken from the output generated by
xsdgen
:_unmarshalTime
function is called when theUnmarshalText
method is used which takes care of the parsing the timezone from the input. ButMarshalText
doesn't consider the timezone and hence ignored.Example
With the
MarshalText
method generated byxsdgen
, it does the marshalling without the timezone:But suppose if
Z07:00
is added toMarshalText
method:Then it properly considers the timezone when marshalling:
The text was updated successfully, but these errors were encountered: