Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A48469770 for ; Tue, 6 Dec 2011 19:00:04 +0000 (UTC) Received: (qmail 20639 invoked by uid 500); 6 Dec 2011 19:00:04 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 20598 invoked by uid 500); 6 Dec 2011 19:00:04 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 20587 invoked by uid 99); 6 Dec 2011 19:00:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Dec 2011 19:00:04 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Dec 2011 19:00:01 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 555AB103349 for ; Tue, 6 Dec 2011 18:59:40 +0000 (UTC) Date: Tue, 6 Dec 2011 18:59:40 +0000 (UTC) From: "Alexander Klimetschek (Issue Comment Edited) (JIRA)" To: dev@jackrabbit.apache.org Message-ID: <1785388389.46375.1323197980350.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1585197426.45782.1323184300211.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Issue Comment Edited] (JCR-3171) jcr:created property on node has wrong time zone set MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on 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