[jira] [Commented] (XALANJ-2623) dateTime() method does not return correct value in case of timezones having +30 minutes offset

2019-04-10 Thread Mohd Amir (JIRA)


[ 
https://issues.apache.org/jira/browse/XALANJ-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16815087#comment-16815087
 ] 

Mohd Amir commented on XALANJ-2623:
---

I tested this code. Seems to work.

 

Thanks. BTW, when will this be available for use?

> dateTime() method does not return correct value in case of timezones having 
> +30 minutes offset
> --
>
> Key: XALANJ-2623
> URL: https://issues.apache.org/jira/browse/XALANJ-2623
> Project: XalanJ2
>  Issue Type: Bug
>  Security Level: No security risk; visible to anyone(Ordinary problems in 
> Xalan projects.  Anybody can view the issue.) 
>Reporter: Mohd Amir
>Assignee: Steven J. Hathaway
>Priority: Major
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> com.sun.org.apache.xalan.internal.lib.ExsltDatetime.dateTime() method returns 
> string such as 
> {code:java}
> 2019-04-08T12:27:01+05:180
> {code}
> rather than
> {code:java}
> 2019-04-08T12:27:01+05:30
> {code}
> The reason is that in the method implementation, the minute offset of 
> timezone is calculated as
> {code:java}
> int min = offset%(60*60*1000);{code}
> while it should be calculated as
> {code:java}
> int min = offset%(60*60*1000)/(60*1000);{code}
> This issue can be reproduced in any location with timezone offset of +30 such 
> as India (IST) or Australia (ACST).
> This causes issues in xslt translation when we use transformations such as
> {code:java}
> ...
> xmlns:date="http://exslt.org/dates-and-times;
> ...
> ...
> ...
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@xalan.apache.org
For additional commands, e-mail: dev-h...@xalan.apache.org



[jira] [Commented] (XALANJ-2623) dateTime() method does not return correct value in case of timezones having +30 minutes offset

2019-04-10 Thread Mukul Gandhi (JIRA)


[ 
https://issues.apache.org/jira/browse/XALANJ-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16815072#comment-16815072
 ] 

Mukul Gandhi commented on XALANJ-2623:
--

committed fix for this, on the branch xalan-j_2_7_1_maint. The fix uses class 
XMLGregorianCalendar introduced in JDK 1.5. If you're happy with the fix, can 
you please resolve/close this bug report.

> dateTime() method does not return correct value in case of timezones having 
> +30 minutes offset
> --
>
> Key: XALANJ-2623
> URL: https://issues.apache.org/jira/browse/XALANJ-2623
> Project: XalanJ2
>  Issue Type: Bug
>  Security Level: No security risk; visible to anyone(Ordinary problems in 
> Xalan projects.  Anybody can view the issue.) 
>Reporter: Mohd Amir
>Assignee: Steven J. Hathaway
>Priority: Major
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> com.sun.org.apache.xalan.internal.lib.ExsltDatetime.dateTime() method returns 
> string such as 
> {code:java}
> 2019-04-08T12:27:01+05:180
> {code}
> rather than
> {code:java}
> 2019-04-08T12:27:01+05:30
> {code}
> The reason is that in the method implementation, the minute offset of 
> timezone is calculated as
> {code:java}
> int min = offset%(60*60*1000);{code}
> while it should be calculated as
> {code:java}
> int min = offset%(60*60*1000)/(60*1000);{code}
> This issue can be reproduced in any location with timezone offset of +30 such 
> as India (IST) or Australia (ACST).
> This causes issues in xslt translation when we use transformations such as
> {code:java}
> ...
> xmlns:date="http://exslt.org/dates-and-times;
> ...
> ...
> ...
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@xalan.apache.org
For additional commands, e-mail: dev-h...@xalan.apache.org