You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Marek Slama (Created) (JIRA)" <ji...@apache.org> on 2011/12/06 16:11:40 UTC
[jira] [Created] (JCR-3171) jcr:created property on node has wrong
time zone set
jcr:created property on node has wrong time zone set
----------------------------------------------------
Key: JCR-3171
URL: https://issues.apache.org/jira/browse/JCR-3171
Project: Jackrabbit Content Repository
Issue Type: Bug
Components: jackrabbit-core
Affects Versions: 2.2.9
Environment: Linux
Reporter: Marek Slama
Priority: Minor
I would expect that default time zone is set when jcr:created property is created by Jackrabbit for node. But I see following:
Default time zone: sun.util.calendar.ZoneInfo[id="Europe/Prague",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=141,lastRule=java.util.SimpleTimeZone[id=Europe/Prague,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]]
Time zone from Calendar instance: sun.util.calendar.ZoneInfo[id="GMT+01:00",offset=3600000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
Is it possible to control time zone set to property jcr:created?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (JCR-3171) jcr:created property on
node has wrong time zone set
Posted by "Alexander Klimetschek (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13163740#comment-13163740 ]
Alexander Klimetschek edited comment on JCR-3171 at 12/6/11 6:59 PM:
---------------------------------------------------------------------
That's correct. The JCR date does not store the full timezone ID (such as "Europe/Prague" in your example), but only the offset. This is because internally the date is stored as ISO 8601 string, which does not keep the ID. That's per spec [0] (unfortunately).
Hence after reading that string again, it will use the simple offset based IDs, such as GMT+01:00 in your case.
If you need to keep the ID, you need to store it in a separate string property.
[0] http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.6.4.3%20From%20DATE%20To
was (Author: alexander.klimetschek):
That's correct. The JCR date does not store the full timezone ID (such as "Europe/Prague") in your example, but only the offset. This is because internally the date is stored as ISO 8601 string, which does not keep the ID [0].
Hence after reading that string again, it will use the simple offset based IDs, such as GMT+01:00 in your case.
[0] http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.6.4.3%20From%20DATE%20To
> jcr:created property on node has wrong time zone set
> ----------------------------------------------------
>
> Key: JCR-3171
> URL: https://issues.apache.org/jira/browse/JCR-3171
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-core
> Affects Versions: 2.2.9
> Environment: Linux
> Reporter: Marek Slama
> Priority: Minor
>
> I would expect that default time zone is set when jcr:created property is created by Jackrabbit for node. But I see following:
> Default time zone: sun.util.calendar.ZoneInfo[id="Europe/Prague",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=141,lastRule=java.util.SimpleTimeZone[id=Europe/Prague,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]]
> Time zone from Calendar instance: sun.util.calendar.ZoneInfo[id="GMT+01:00",offset=3600000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
> Is it possible to control time zone set to property jcr:created? Any hint where time zone is set for jcr:created property would be appreciated so that I can investigate in my environment.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (JCR-3171) jcr:created property on node has wrong
time zone set
Posted by "Marek Slama (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marek Slama updated JCR-3171:
-----------------------------
Description:
I would expect that default time zone is set when jcr:created property is created by Jackrabbit for node. But I see following:
Default time zone: sun.util.calendar.ZoneInfo[id="Europe/Prague",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=141,lastRule=java.util.SimpleTimeZone[id=Europe/Prague,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]]
Time zone from Calendar instance: sun.util.calendar.ZoneInfo[id="GMT+01:00",offset=3600000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
Is it possible to control time zone set to property jcr:created? Any hint where time zone is set for jcr:created property would be appreciated so that I can investigate in my environment.
was:
I would expect that default time zone is set when jcr:created property is created by Jackrabbit for node. But I see following:
Default time zone: sun.util.calendar.ZoneInfo[id="Europe/Prague",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=141,lastRule=java.util.SimpleTimeZone[id=Europe/Prague,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]]
Time zone from Calendar instance: sun.util.calendar.ZoneInfo[id="GMT+01:00",offset=3600000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
Is it possible to control time zone set to property jcr:created? It looks like it works in some environments but so far I was not able to find out why and what is cause of this behavior. Any hint where time zone is set for jcr:created property would be appreciated so that I can investigate in my environment.
> jcr:created property on node has wrong time zone set
> ----------------------------------------------------
>
> Key: JCR-3171
> URL: https://issues.apache.org/jira/browse/JCR-3171
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-core
> Affects Versions: 2.2.9
> Environment: Linux
> Reporter: Marek Slama
> Priority: Minor
>
> I would expect that default time zone is set when jcr:created property is created by Jackrabbit for node. But I see following:
> Default time zone: sun.util.calendar.ZoneInfo[id="Europe/Prague",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=141,lastRule=java.util.SimpleTimeZone[id=Europe/Prague,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]]
> Time zone from Calendar instance: sun.util.calendar.ZoneInfo[id="GMT+01:00",offset=3600000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
> Is it possible to control time zone set to property jcr:created? Any hint where time zone is set for jcr:created property would be appreciated so that I can investigate in my environment.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (JCR-3171) jcr:created property on node has wrong
time zone set
Posted by "Marek Slama (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marek Slama updated JCR-3171:
-----------------------------
Description:
I would expect that default time zone is set when jcr:created property is created by Jackrabbit for node. But I see following:
Default time zone: sun.util.calendar.ZoneInfo[id="Europe/Prague",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=141,lastRule=java.util.SimpleTimeZone[id=Europe/Prague,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]]
Time zone from Calendar instance: sun.util.calendar.ZoneInfo[id="GMT+01:00",offset=3600000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
Is it possible to control time zone set to property jcr:created? It looks like it works in some environments but so far I was not able to find out why and what is cause of this behavior. Any hint where time zone is set for jcr:created property would be appreciated so that I can investigate in my environment.
was:
I would expect that default time zone is set when jcr:created property is created by Jackrabbit for node. But I see following:
Default time zone: sun.util.calendar.ZoneInfo[id="Europe/Prague",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=141,lastRule=java.util.SimpleTimeZone[id=Europe/Prague,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]]
Time zone from Calendar instance: sun.util.calendar.ZoneInfo[id="GMT+01:00",offset=3600000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
Is it possible to control time zone set to property jcr:created?
> jcr:created property on node has wrong time zone set
> ----------------------------------------------------
>
> Key: JCR-3171
> URL: https://issues.apache.org/jira/browse/JCR-3171
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-core
> Affects Versions: 2.2.9
> Environment: Linux
> Reporter: Marek Slama
> Priority: Minor
>
> I would expect that default time zone is set when jcr:created property is created by Jackrabbit for node. But I see following:
> Default time zone: sun.util.calendar.ZoneInfo[id="Europe/Prague",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=141,lastRule=java.util.SimpleTimeZone[id=Europe/Prague,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]]
> Time zone from Calendar instance: sun.util.calendar.ZoneInfo[id="GMT+01:00",offset=3600000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
> Is it possible to control time zone set to property jcr:created? It looks like it works in some environments but so far I was not able to find out why and what is cause of this behavior. Any hint where time zone is set for jcr:created property would be appreciated so that I can investigate in my environment.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (JCR-3171) jcr:created property on node has wrong
time zone set
Posted by "Alexander Klimetschek (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Klimetschek resolved JCR-3171.
----------------------------------------
Resolution: Not A Problem
That's correct. The JCR date does not store the full timezone ID (such as "Europe/Prague") in your example, but only the offset. This is because internally the date is stored as ISO 8601 string, which does not keep the ID [0].
Hence after reading that string again, it will use the simple offset based IDs, such as GMT+01:00 in your case.
[0] http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.6.4.3%20From%20DATE%20To
> jcr:created property on node has wrong time zone set
> ----------------------------------------------------
>
> Key: JCR-3171
> URL: https://issues.apache.org/jira/browse/JCR-3171
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-core
> Affects Versions: 2.2.9
> Environment: Linux
> Reporter: Marek Slama
> Priority: Minor
>
> I would expect that default time zone is set when jcr:created property is created by Jackrabbit for node. But I see following:
> Default time zone: sun.util.calendar.ZoneInfo[id="Europe/Prague",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=141,lastRule=java.util.SimpleTimeZone[id=Europe/Prague,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]]
> Time zone from Calendar instance: sun.util.calendar.ZoneInfo[id="GMT+01:00",offset=3600000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
> Is it possible to control time zone set to property jcr:created? Any hint where time zone is set for jcr:created property would be appreciated so that I can investigate in my environment.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira