You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Pavel Pervov (JIRA)" <ji...@apache.org> on 2008/02/05 17:40:08 UTC
[jira] Created: (HARMONY-5459) [classlib][util] default TimeZone
ignores raw offset after switch to ICU.
[classlib][util] default TimeZone ignores raw offset after switch to ICU.
-------------------------------------------------------------------------
Key: HARMONY-5459
URL: https://issues.apache.org/jira/browse/HARMONY-5459
Project: Harmony
Issue Type: Bug
Components: Classlib
Environment: All
Reporter: Pavel Pervov
The following test fails on Harmony but passes on RI.
------------------
import java.util.TimeZone;
class TimeZoneTest {
public static void main(String[] args) {
TimeZone tz1 = (TimeZone)TimeZone.getDefault();
System.out.println(tz1);
int fourHours = 4*60*60*1000;
tz1.setRawOffset(fourHours);
System.out.println(tz1);
if(tz1.getOffset(1, 2000, 01, 1, 7, 0) == fourHours) {
System.out.println("PASSED");
} else {
System.out.println("FAILED: rawOffset is ignored");
}
}
}
------------------
I'll attach simple patch to fix this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5459) [classlib][util] default TimeZone
ignores raw offset after switch to ICU.
Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Pervov updated HARMONY-5459:
----------------------------------
Priority: Minor (was: Major)
Lowering the priority because it looks like nobody's affected.
> [classlib][util] default TimeZone ignores raw offset after switch to ICU.
> -------------------------------------------------------------------------
>
> Key: HARMONY-5459
> URL: https://issues.apache.org/jira/browse/HARMONY-5459
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Linux x86-64
> Reporter: Pavel Pervov
> Assignee: Tony Wu
> Priority: Minor
> Fix For: 5.0M5
>
> Attachments: H5459.patch
>
>
> The following test fails on Harmony but passes on RI.
> ------------------
> import java.util.TimeZone;
> class TimeZoneTest {
> public static void main(String[] args) {
> TimeZone tz1 = (TimeZone)TimeZone.getDefault();
> System.out.println(tz1);
> int fourHours = 4*60*60*1000;
> tz1.setRawOffset(fourHours);
> System.out.println(tz1);
> if(tz1.getOffset(1, 2000, 01, 1, 7, 0) == fourHours) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED: rawOffset is ignored");
> }
> }
> }
> ------------------
> I'll attach simple patch to fix this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-5459) [classlib][util] default TimeZone
ignores raw offset after switch to ICU.
Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tony Wu closed HARMONY-5459.
----------------------------
verified by Pavel.
> [classlib][util] default TimeZone ignores raw offset after switch to ICU.
> -------------------------------------------------------------------------
>
> Key: HARMONY-5459
> URL: https://issues.apache.org/jira/browse/HARMONY-5459
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: All
> Reporter: Pavel Pervov
> Assignee: Tony Wu
> Fix For: 5.0M5
>
> Attachments: H5459.patch
>
>
> The following test fails on Harmony but passes on RI.
> ------------------
> import java.util.TimeZone;
> class TimeZoneTest {
> public static void main(String[] args) {
> TimeZone tz1 = (TimeZone)TimeZone.getDefault();
> System.out.println(tz1);
> int fourHours = 4*60*60*1000;
> tz1.setRawOffset(fourHours);
> System.out.println(tz1);
> if(tz1.getOffset(1, 2000, 01, 1, 7, 0) == fourHours) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED: rawOffset is ignored");
> }
> }
> }
> ------------------
> I'll attach simple patch to fix this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5459) [classlib][util] default TimeZone
ignores raw offset after switch to ICU.
Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Pervov updated HARMONY-5459:
----------------------------------
Attachment: H5459.patch
Here is the patch to fix the issue.
SimpleTimeZone didn't pass rawOffset value to ICU and subsequent call to icuTZ.getOffset returned old value.
> [classlib][util] default TimeZone ignores raw offset after switch to ICU.
> -------------------------------------------------------------------------
>
> Key: HARMONY-5459
> URL: https://issues.apache.org/jira/browse/HARMONY-5459
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: All
> Reporter: Pavel Pervov
> Attachments: H5459.patch
>
>
> The following test fails on Harmony but passes on RI.
> ------------------
> import java.util.TimeZone;
> class TimeZoneTest {
> public static void main(String[] args) {
> TimeZone tz1 = (TimeZone)TimeZone.getDefault();
> System.out.println(tz1);
> int fourHours = 4*60*60*1000;
> tz1.setRawOffset(fourHours);
> System.out.println(tz1);
> if(tz1.getOffset(1, 2000, 01, 1, 7, 0) == fourHours) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED: rawOffset is ignored");
> }
> }
> }
> ------------------
> I'll attach simple patch to fix this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-5459) [classlib][util] default TimeZone
ignores raw offset after switch to ICU.
Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tony Wu resolved HARMONY-5459.
------------------------------
Resolution: Fixed
Patch applied at r620129 with testcase. thanks for your contribution, please verify if it fixed as you expected.
Note that setRowOffset only has effect for the current year and beyond.
> [classlib][util] default TimeZone ignores raw offset after switch to ICU.
> -------------------------------------------------------------------------
>
> Key: HARMONY-5459
> URL: https://issues.apache.org/jira/browse/HARMONY-5459
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: All
> Reporter: Pavel Pervov
> Assignee: Tony Wu
> Fix For: 5.0M5
>
> Attachments: H5459.patch
>
>
> The following test fails on Harmony but passes on RI.
> ------------------
> import java.util.TimeZone;
> class TimeZoneTest {
> public static void main(String[] args) {
> TimeZone tz1 = (TimeZone)TimeZone.getDefault();
> System.out.println(tz1);
> int fourHours = 4*60*60*1000;
> tz1.setRawOffset(fourHours);
> System.out.println(tz1);
> if(tz1.getOffset(1, 2000, 01, 1, 7, 0) == fourHours) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED: rawOffset is ignored");
> }
> }
> }
> ------------------
> I'll attach simple patch to fix this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5459) [classlib][util] default TimeZone
ignores raw offset after switch to ICU.
Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Pervov updated HARMONY-5459:
----------------------------------
Fix Version/s: 5.0M5
> [classlib][util] default TimeZone ignores raw offset after switch to ICU.
> -------------------------------------------------------------------------
>
> Key: HARMONY-5459
> URL: https://issues.apache.org/jira/browse/HARMONY-5459
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: All
> Reporter: Pavel Pervov
> Fix For: 5.0M5
>
> Attachments: H5459.patch
>
>
> The following test fails on Harmony but passes on RI.
> ------------------
> import java.util.TimeZone;
> class TimeZoneTest {
> public static void main(String[] args) {
> TimeZone tz1 = (TimeZone)TimeZone.getDefault();
> System.out.println(tz1);
> int fourHours = 4*60*60*1000;
> tz1.setRawOffset(fourHours);
> System.out.println(tz1);
> if(tz1.getOffset(1, 2000, 01, 1, 7, 0) == fourHours) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED: rawOffset is ignored");
> }
> }
> }
> ------------------
> I'll attach simple patch to fix this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (HARMONY-5459) [classlib][util] default TimeZone
ignores raw offset after switch to ICU.
Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Pervov reopened HARMONY-5459:
-----------------------------------
Well, it seems that something is still wrong on Linux x86-64. I'll investigate further and report back here then.
> [classlib][util] default TimeZone ignores raw offset after switch to ICU.
> -------------------------------------------------------------------------
>
> Key: HARMONY-5459
> URL: https://issues.apache.org/jira/browse/HARMONY-5459
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: All
> Reporter: Pavel Pervov
> Assignee: Tony Wu
> Fix For: 5.0M5
>
> Attachments: H5459.patch
>
>
> The following test fails on Harmony but passes on RI.
> ------------------
> import java.util.TimeZone;
> class TimeZoneTest {
> public static void main(String[] args) {
> TimeZone tz1 = (TimeZone)TimeZone.getDefault();
> System.out.println(tz1);
> int fourHours = 4*60*60*1000;
> tz1.setRawOffset(fourHours);
> System.out.println(tz1);
> if(tz1.getOffset(1, 2000, 01, 1, 7, 0) == fourHours) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED: rawOffset is ignored");
> }
> }
> }
> ------------------
> I'll attach simple patch to fix this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5459) [classlib][util] default TimeZone
ignores raw offset after switch to ICU.
Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586814#action_12586814 ]
Pavel Pervov commented on HARMONY-5459:
---------------------------------------
I have looked through the implementation of SimpleTimeZone.setRawOffset/TimeZone.getOffset and I didn't find the place which could cause the issue on this specific platform.
Tony, could you, please, look into this as you clearly have more expertise in ICU? Thanks.
> [classlib][util] default TimeZone ignores raw offset after switch to ICU.
> -------------------------------------------------------------------------
>
> Key: HARMONY-5459
> URL: https://issues.apache.org/jira/browse/HARMONY-5459
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: All
> Reporter: Pavel Pervov
> Assignee: Tony Wu
> Fix For: 5.0M5
>
> Attachments: H5459.patch
>
>
> The following test fails on Harmony but passes on RI.
> ------------------
> import java.util.TimeZone;
> class TimeZoneTest {
> public static void main(String[] args) {
> TimeZone tz1 = (TimeZone)TimeZone.getDefault();
> System.out.println(tz1);
> int fourHours = 4*60*60*1000;
> tz1.setRawOffset(fourHours);
> System.out.println(tz1);
> if(tz1.getOffset(1, 2000, 01, 1, 7, 0) == fourHours) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED: rawOffset is ignored");
> }
> }
> }
> ------------------
> I'll attach simple patch to fix this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HARMONY-5459) [classlib][util] default TimeZone
ignores raw offset after switch to ICU.
Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tony Wu reassigned HARMONY-5459:
--------------------------------
Assignee: Tony Wu
> [classlib][util] default TimeZone ignores raw offset after switch to ICU.
> -------------------------------------------------------------------------
>
> Key: HARMONY-5459
> URL: https://issues.apache.org/jira/browse/HARMONY-5459
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: All
> Reporter: Pavel Pervov
> Assignee: Tony Wu
> Fix For: 5.0M5
>
> Attachments: H5459.patch
>
>
> The following test fails on Harmony but passes on RI.
> ------------------
> import java.util.TimeZone;
> class TimeZoneTest {
> public static void main(String[] args) {
> TimeZone tz1 = (TimeZone)TimeZone.getDefault();
> System.out.println(tz1);
> int fourHours = 4*60*60*1000;
> tz1.setRawOffset(fourHours);
> System.out.println(tz1);
> if(tz1.getOffset(1, 2000, 01, 1, 7, 0) == fourHours) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED: rawOffset is ignored");
> }
> }
> }
> ------------------
> I'll attach simple patch to fix this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5459) [classlib][util] default TimeZone
ignores raw offset after switch to ICU.
Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Pervov updated HARMONY-5459:
----------------------------------
Environment: Linux x86-64 (was: All)
Changed environment.
> [classlib][util] default TimeZone ignores raw offset after switch to ICU.
> -------------------------------------------------------------------------
>
> Key: HARMONY-5459
> URL: https://issues.apache.org/jira/browse/HARMONY-5459
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Linux x86-64
> Reporter: Pavel Pervov
> Assignee: Tony Wu
> Fix For: 5.0M5
>
> Attachments: H5459.patch
>
>
> The following test fails on Harmony but passes on RI.
> ------------------
> import java.util.TimeZone;
> class TimeZoneTest {
> public static void main(String[] args) {
> TimeZone tz1 = (TimeZone)TimeZone.getDefault();
> System.out.println(tz1);
> int fourHours = 4*60*60*1000;
> tz1.setRawOffset(fourHours);
> System.out.println(tz1);
> if(tz1.getOffset(1, 2000, 01, 1, 7, 0) == fourHours) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED: rawOffset is ignored");
> }
> }
> }
> ------------------
> I'll attach simple patch to fix this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5459) [classlib][util] default TimeZone
ignores raw offset after switch to ICU.
Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567989#action_12567989 ]
Pavel Pervov commented on HARMONY-5459:
---------------------------------------
Tony, things work fine now, thanks.
> [classlib][util] default TimeZone ignores raw offset after switch to ICU.
> -------------------------------------------------------------------------
>
> Key: HARMONY-5459
> URL: https://issues.apache.org/jira/browse/HARMONY-5459
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: All
> Reporter: Pavel Pervov
> Assignee: Tony Wu
> Fix For: 5.0M5
>
> Attachments: H5459.patch
>
>
> The following test fails on Harmony but passes on RI.
> ------------------
> import java.util.TimeZone;
> class TimeZoneTest {
> public static void main(String[] args) {
> TimeZone tz1 = (TimeZone)TimeZone.getDefault();
> System.out.println(tz1);
> int fourHours = 4*60*60*1000;
> tz1.setRawOffset(fourHours);
> System.out.println(tz1);
> if(tz1.getOffset(1, 2000, 01, 1, 7, 0) == fourHours) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED: rawOffset is ignored");
> }
> }
> }
> ------------------
> I'll attach simple patch to fix this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.