From common-issues-return-180989-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Thu Aug 1 12:18:10 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2DD8C180644 for ; Thu, 1 Aug 2019 14:18:10 +0200 (CEST) Received: (qmail 72650 invoked by uid 500); 1 Aug 2019 12:18:03 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 72364 invoked by uid 99); 1 Aug 2019 12:18:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Aug 2019 12:18:02 +0000 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 3230DE2F93 for ; Thu, 1 Aug 2019 12:18:02 +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 E4C5F26655 for ; Thu, 1 Aug 2019 12:18:00 +0000 (UTC) Date: Thu, 1 Aug 2019 12:18:00 +0000 (UTC) From: "Bilahari T H (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Work started] (HADOOP-16479) ABFS FileStatus.getModificationTime returns localized time instead of UTC MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-16479?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:all-tabpanel ] Work on HADOOP-16479 started by Bilahari T H. --------------------------------------------- > ABFS FileStatus.getModificationTime returns localized time instead of UTC > ------------------------------------------------------------------------- > > Key: HADOOP-16479 > URL: https://issues.apache.org/jira/browse/HADOOP-16479 > Project: Hadoop Common > Issue Type: Sub-task > Components: fs/azure > Affects Versions: 3.2.0 > Reporter: Joan Sala Reixach > Assignee: Bilahari T H > Priority: Major > Attachments: HADOOP-16479-001.patch, image-2019-07-31-18-21-53-02= 3.png, image-2019-07-31-18-23-37-349.png > > > As per javadoc, the method FileStatus.getModificationTime() should return= the time in UTC, but it returns the time in the JVM timezone. > The issue origins in AzureBlobFileSystemStore.getFileStatus() itself, sin= ce=C2=A0 parseLastModifiedTime() returns a wrong date. I have created a fil= e in Azure Data Lake Gen2 and when I look at=C2=A0 it through the Azure Exp= lorer it shows the correct modification time, but the method returns -2 hou= rs time (I am in CET =3D UTC+2). > Azure Explorer last modified time: > !image-2019-07-31-18-21-53-023.png|width=3D460,height=3D45! > AbfsClient parseLastModifiedTime: > !image-2019-07-31-18-23-37-349.png|width=3D459,height=3D284! > It shows 15:21 CEST as utcDate, when it should be 15:21 UTC, which result= s in the 2 hour loss. > DateFormat.parse uses a localized calendar to parse dates which might be = the source of the issue. -- This message was sent by Atlassian JIRA (v7.6.14#76016) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org