From nobody Fri May 3 11:26:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43695+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43695+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1563005315; cv=none; d=zoho.com; s=zohoarc; b=DoSAXuJpUYx3ngVtWgZ4NJ5QhH0ekurM1LiHjWUejiHcJdB5eQKoJrZuIpeovG5fFR7OpZ9UO31CV9OjBRtms2KE6DPyM1HmNB5e83WaEHb5oCZDwEl57Ki/Nx7zSE8OMlbfWaNP+MlsoRuKFu1aO3iR3vkoyTYrXtyJqgtZoo8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563005315; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=ZeUuwpgphSmxPKg9kK0xjBcNIW5AniXyw4FgoqlYWbs=; b=ImwUfbUO38ZgIDiFgjx+X441BkZOhr3WpkfOhcD5ZlkPZ+YXmbDH7TvM1cl6HkV+uePnrWAdNSiLX9dyXLV6fQqn2DGS6NnS1DQaBYaE2u9Tn05JNY51Ega7lTkUzZnHxIb+GP1Nayk107grVJBVjfX8c0uzx9g5NCk9J3Trs4I= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43695+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1563005315739838.9202364039023; Sat, 13 Jul 2019 01:08:35 -0700 (PDT) Return-Path: X-Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by groups.io with SMTP; Sat, 13 Jul 2019 01:08:34 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jul 2019 01:08:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,485,1557212400"; d="scan'208";a="166880178" X-Received: from abaradwa-mobl.amr.corp.intel.com (HELO jljusten-skl.amr.corp.intel.com) ([10.254.104.4]) by fmsmga008.fm.intel.com with ESMTP; 13 Jul 2019 01:08:33 -0700 From: "Jordan Justen" To: devel@edk2.groups.io Cc: Jordan Justen , Andrew Fish , Ray Ni Subject: [edk2-devel] [PATCH] EmulatorPkg/Unix: Convert timezone from seconds to minutes Date: Sat, 13 Jul 2019 01:08:13 -0700 Message-Id: <20190713080813.9869-1-jordan.l.justen@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,jordan.l.justen@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1563005315; bh=jH4tfLwBm7OSa4zyxbofzti3MmSkZBC2ee+4weuNhHc=; h=Cc:Date:From:Reply-To:Subject:To; b=BiN88jMStckX7IFKNpEouxEwIp5xioWKQenxf9qmWNqwmvEAz1d+LZpHoCS/xLgZDZW 96TH3t4s05xstDWiDRtZM6IT2Lt4CqJw9/K2cOFJh/GfO8q831i1adbvmv6/4Cbd8d1w0 7n/ajhcNUE2HA3XZNQKLswMzW/zsk0vzdCw= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Fixes and assert seen when running ls under the shell. It appears the assert was added in: commit 99849a906e15ea3a9a0330d69bbae0d21ff49808 ShellPkg/ls: Display the file time in local time. Signed-off-by: Jordan Justen Cc: Andrew Fish Cc: Ray Ni Reviewed-by: Ray Ni --- For reference: https://linux.die.net/man/3/timezone EmulatorPkg/Unix/Host/EmuThunk.c | 2 +- EmulatorPkg/Unix/Host/PosixFileSystem.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/EmulatorPkg/Unix/Host/EmuThunk.c b/EmulatorPkg/Unix/Host/EmuTh= unk.c index f1330c8234..665477e223 100644 --- a/EmulatorPkg/Unix/Host/EmuThunk.c +++ b/EmulatorPkg/Unix/Host/EmuThunk.c @@ -363,7 +363,7 @@ SecGetTime ( Time->Minute =3D tm->tm_min; Time->Second =3D tm->tm_sec; Time->Nanosecond =3D 0; - Time->TimeZone =3D timezone; + Time->TimeZone =3D timezone / 60; Time->Daylight =3D (daylight ? EFI_TIME_ADJUST_DAYLIGHT : 0) | (tm->tm_isdst > 0 ? EFI_TIME_IN_DAYLIGHT : 0); =20 diff --git a/EmulatorPkg/Unix/Host/PosixFileSystem.c b/EmulatorPkg/Unix/Hos= t/PosixFileSystem.c index 3149c6c3e0..5b74053498 100644 --- a/EmulatorPkg/Unix/Host/PosixFileSystem.c +++ b/EmulatorPkg/Unix/Host/PosixFileSystem.c @@ -220,7 +220,7 @@ PosixSystemTimeToEfiTime ( Time->Second =3D tm->tm_sec; Time->Nanosecond =3D 0; =20 - Time->TimeZone =3D timezone; + Time->TimeZone =3D timezone / 60; Time->Daylight =3D (daylight ? EFI_TIME_ADJUST_DAYLIGHT : 0) | (tm->tm_i= sdst > 0 ? EFI_TIME_IN_DAYLIGHT : 0); } =20 --=20 2.22.0 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43695): https://edk2.groups.io/g/devel/message/43695 Mute This Topic: https://groups.io/mt/32457224/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-