Return-Path: X-Original-To: apmail-directory-users-archive@www.apache.org Delivered-To: apmail-directory-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 997386C82 for ; Mon, 25 Jul 2011 07:57:30 +0000 (UTC) Received: (qmail 67332 invoked by uid 500); 25 Jul 2011 07:57:30 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 66931 invoked by uid 500); 25 Jul 2011 07:57:24 -0000 Mailing-List: contact users-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@directory.apache.org Delivered-To: mailing list users@directory.apache.org Received: (qmail 66728 invoked by uid 99); 25 Jul 2011 07:57:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2011 07:57:20 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of elecharny@gmail.com designates 74.125.82.44 as permitted sender) Received: from [74.125.82.44] (HELO mail-ww0-f44.google.com) (74.125.82.44) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2011 07:57:11 +0000 Received: by wwe5 with SMTP id 5so3811382wwe.1 for ; Mon, 25 Jul 2011 00:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=7Fn0WtrCkWvyajNopqrx4sB+44NN/FgrEYvBelQCXeo=; b=RxbxN+Ezod+hZI4kwwh9yUQk6pmQXu6wl/Hpn7w09r6ojFl5+GvBOnaflArc5xbMqa fQlZsLtLNwpabG5HswwTTobOIKy+sz+qFqolfD+TT9DH+6N2dvjAIfqUqxdBTSlc2aqC pUI4aG1qK2mNqWD+dEVs9/d3EH6LlVUczCiq0= Received: by 10.227.205.78 with SMTP id fp14mr3517309wbb.65.1311580611702; Mon, 25 Jul 2011 00:56:51 -0700 (PDT) Received: from luc14-1-78-235-65-101.fbx.proxad.net (luc14-1-78-235-65-101.fbx.proxad.net [78.235.65.101]) by mx.google.com with ESMTPS id b13sm4093938wbh.41.2011.07.25.00.56.49 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Jul 2011 00:56:49 -0700 (PDT) Message-ID: <4E2D21C0.6040207@gmail.com> Date: Mon, 25 Jul 2011 09:56:48 +0200 From: Emmanuel Lecharny Reply-To: elecharny@apache.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: users@directory.apache.org Subject: Re: createTimestamp conversion References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 7/25/11 8:58 AM, Manish Kutaula wrote: > Hi, > > the entry for the createtimestamp shows 20110725054811Z it may be in > yyyy-mm-dd-hh-mm-ss-Z format > while the date is correct , the time is still a problem. 5h 48mins 11secs. Seems to be correct. > > Can you tell me in which format apacheds is storing the timestamp and how > can it convert it into human readable format. RFC 4517 : 3.3.13. Generalized Time A value of the Generalized Time syntax is a character string representing a date and time. The LDAP-specific encoding of a value of this syntax is a restriction of the format defined in [ISO8601], and is described by the following ABNF: GeneralizedTime = century year month day hour [ minute [ second / leap-second ] ] [ fraction ] g-time-zone century = 2(%x30-39) ; "00" to "99" year = 2(%x30-39) ; "00" to "99" month = ( %x30 %x31-39 ) ; "01" (January) to "09" / ( %x31 %x30-32 ) ; "10" to "12" day = ( %x30 %x31-39 ) ; "01" to "09" / ( %x31-32 %x30-39 ) ; "10" to "29" / ( %x33 %x30-31 ) ; "30" to "31" hour = ( %x30-31 %x30-39 ) / ( %x32 %x30-33 ) ; "00" to "23" minute = %x30-35 %x30-39 ; "00" to "59" second = ( %x30-35 %x30-39 ) ; "00" to "59" leap-second = ( %x36 %x30 ) ; "60" fraction = ( DOT / COMMA ) 1*(%x30-39) g-time-zone = %x5A ; "Z" / g-differential g-differential = ( MINUS / PLUS ) hour [ minute ] MINUS = %x2D ; minus sign ("-") The,, and rules are defined in [RFC4512]. The above ABNF allows character strings that do not represent valid dates (in the Gregorian calendar) and/or valid times (e.g., February 31, 1994). Such character strings SHOULD be considered invalid for this syntax. The time value represents coordinated universal time (equivalent to Greenwich Mean Time) if the "Z" form of is used; otherwise, the value represents a local time in the time zone indicated by. In the latter case, coordinated universal time can be calculated by subtracting the differential from the local time. The "Z" form of SHOULD be used in preference to. If is omitted, then represents a fraction of an hour; otherwise, if and are omitted, then represents a fraction of a minute; otherwise, represents a fraction of a second. Examples: 199412161032Z 199412160532-0500 Both example values represent the same coordinated universal time: 10:32 AM, December 16, 1994. The LDAP definition for the Generalized Time syntax is: ( 1.3.6.1.4.1.1466.115.121.1.24 DESC 'Generalized Time' ) This syntax corresponds to the GeneralizedTime ASN.1 type from [ASN.1], with the constraint that local time without a differential SHALL NOT be used. -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com