Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A0ADB200C4D for ; Tue, 21 Mar 2017 17:00:55 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9F44A160B68; Tue, 21 Mar 2017 16:00:55 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E3C2B160B74 for ; Tue, 21 Mar 2017 17:00:54 +0100 (CET) Received: (qmail 98733 invoked by uid 500); 21 Mar 2017 16:00:53 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 98724 invoked by uid 99); 21 Mar 2017 16:00:53 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Mar 2017 16:00:53 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 465561A7B80 for ; Tue, 21 Mar 2017 16:00:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -98.048 X-Spam-Level: X-Spam-Status: No, score=-98.048 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_NUMSUBJECT=0.5, RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id TKJx_Id6SXyE for ; Tue, 21 Mar 2017 16:00:52 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 12B925FB99 for ; Tue, 21 Mar 2017 16:00:52 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 0F3D3E08C3 for ; Tue, 21 Mar 2017 16:00:46 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id E1A31254D7 for ; Tue, 21 Mar 2017 16:00:44 +0000 (UTC) Date: Tue, 21 Mar 2017 16:00:44 +0000 (UTC) From: =?utf-8?Q?Maciej_Kwidzi=C5=84ski_=28JIRA=29?= To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (LOG4J2-1246) PatternLayout %date conversion pattern should render time zone designator for ISO-ISO8601 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 21 Mar 2017 16:00:55 -0000 [ https://issues.apache.org/jira/browse/LOG4J2-1246?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D159= 34629#comment-15934629 ]=20 Maciej Kwidzi=C5=84ski edited comment on LOG4J2-1246 at 3/21/17 4:00 PM: -------------------------------------------------------------------- Workaround: {{%d\{ISO8601\}\{UTC\}Z}} ;) However, I do agree that by default, the timezone should be printed explici= tly. The current default promotes bad engineering and is the cause of endless fr= ustration and loss of productivity when working with numerous logs. was (Author: dagguh): Workaround: {{%d\{ISO8601\}\{UTC\}Z}} ;) > PatternLayout %date conversion pattern should render time zone designator= for ISO-ISO8601 > -------------------------------------------------------------------------= ---------------- > > Key: LOG4J2-1246 > URL: https://issues.apache.org/jira/browse/LOG4J2-1246 > Project: Log4j 2 > Issue Type: Bug > Components: Pattern Converters > Affects Versions: 2.4.1, 2.5 > Reporter: Daniel Marcotte > Fix For: 2.8.2 > > > Hi there! > There might be a small issue with the Pattern Converters regarding Timezo= ne management: http://logging.apache.org/log4j/2.x/manual/layouts.html#Patt= ernLayout > Right now, these patterns: > * {{"%d\{ISO8601_BASIC\}}} > * {{%d\{ISO8601_BASIC\}\{UTC\}}} > Give the same results: > * {{20160104T204256,048}} > * {{20160104T204256,048}} > However, with a deeper look at the ISO-8601 standards, the second one wit= h {{"\{UTC\}"}} should properly add the Timezone at the end of the timestam= p. > Reference: https://en.wikipedia.org/wiki/ISO_8601#Times > {quote} > *UTC* > If the time is in UTC, add a Z directly after the time without a space. Z= is the zone designator for the zero UTC offset. "09:30 UTC" is therefore r= epresented as "09:30Z" or "0930Z". "14:45:15 UTC" would be "14:45:15Z" or "= 144515Z". > UTC time is also known as 'Zulu' time, since 'Zulu' is the NATO phonetic = alphabet word for 'Z'. > *Examples* >