Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2899092ybd; Mon, 24 Jun 2019 15:00:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWYDCLpow+8S7AYTbNZ9cXK4cInEfU7e9q8kxpC7m4HEuhJUrbSozjetgLYUmxA7ZKLe9g X-Received: by 2002:a17:902:3225:: with SMTP id y34mr32150553plb.135.1561413620646; Mon, 24 Jun 2019 15:00:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561413620; cv=none; d=google.com; s=arc-20160816; b=dfLvzVsJXEVEabjlrPLPzHs2BExO43Wcdzzkqc6ddZnHW+JItQKhZBar3ANDOqS6Vl KFAbfAAlmqhYVcFiIlkYHiXyH9z+V6IqypbQBQRbPrFj+qs27IUGB3Bmho4BGVbNC2Bm esa0GI6aydNwontJ4FfW/nMP8us8h6rxh1dCfLhiVtzebJJadvL8NbsU6wq5/qHOJZW/ ZbqgQJv9+sivNnlqg5qAA7VZZ1cMfQJtnLnx/SkLu+S/8etcyikvqLcs0eQNY+omrQON RGWGxNdAJW1J9JsbQM+eQqgyKDpUGX1m7gKQznjonAuuIIsGqSNtqTd2ZlzNXT5QHa3u 4WOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=p3We6GSHJ98hjf3Z6J6Lpj03TnqSLfet19df5muGC4Y=; b=H52W0aRWeniGjD6YfeEF5/q3k4eukBq9R6+mfuUI06bvEbQ5M60FESADFY7utpmX4z ixz1p+E6do5+2AEcrJB/gKY/jkgyX1vhKL+TJmTx8DinVSA2LxzH2z+rDc6sLA4x0nPT T7g8GVeSkll0Ru+nMjF7TCvIsAj/Hn9FmVx0vyZ/yo1Czhak325/JUz4pWKtVSbkB5TP 5mHsoBzYDWiHWy7R+xfMYDzP05G4xmlIYIdym9moT3XTfxhVLQqqR37TRswNr1Tus6w1 DAFiWw3YuGCPbdFDVGgiauulGLTOk/TnkS2F71scaw2b4M1Qr6A/WFYIOtiMiH5IITQT KVYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n15si10846743plp.354.2019.06.24.15.00.05; Mon, 24 Jun 2019 15:00:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730007AbfFXT5O (ORCPT + 99 others); Mon, 24 Jun 2019 15:57:14 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:48617 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727282AbfFXT5N (ORCPT ); Mon, 24 Jun 2019 15:57:13 -0400 Received: from localhost (lfbn-1-1545-137.w90-65.abo.wanadoo.fr [90.65.161.137]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 874FF240005; Mon, 24 Jun 2019 19:57:05 +0000 (UTC) Date: Mon, 24 Jun 2019 21:57:05 +0200 From: Alexandre Belloni To: Finn Thain Cc: Alessandro Zummo , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rtc: Don't state that the RTC holds UTC in case it doesn't Message-ID: <20190624195705.GD5690@piout.net> References: <3e1e24a326b8b623b1a8b66a905ac6494ef74a07.1561081886.git.fthain@telegraphics.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3e1e24a326b8b623b1a8b66a905ac6494ef74a07.1561081886.git.fthain@telegraphics.com.au> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/06/2019 11:51:26+1000, Finn Thain wrote: > Some machines store local time in the Real Time Clock. The hard-coded > "UTC" string is wrong on those machines so just omit that string. > Update the log parser so it doesn't require the string "UTC". > I don't agree, hctossys will always think the RTC is in UTC. If you store local time in the RTC, then you are probably not using hctosys because it definitively doesn't know about the timezone and will incorrectly set the system time. That information is usually kept in /etc/adjtime. > Signed-off-by: Finn Thain > --- > drivers/rtc/hctosys.c | 2 +- > tools/power/pm-graph/bootgraph.py | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/rtc/hctosys.c b/drivers/rtc/hctosys.c > index ff2092a0d38c..2270eca23203 100644 > --- a/drivers/rtc/hctosys.c > +++ b/drivers/rtc/hctosys.c > @@ -58,7 +58,7 @@ static int __init rtc_hctosys(void) > > err = do_settimeofday64(&tv64); > > - dev_info(rtc->dev.parent, "setting system clock to %ptR UTC (%lld)\n", > + dev_info(rtc->dev.parent, "setting system clock to %ptR (%lld)\n", > &tm, (long long)tv64.tv_sec); > > err_read: > diff --git a/tools/power/pm-graph/bootgraph.py b/tools/power/pm-graph/bootgraph.py > index 6dae57041537..5a045d1cb879 100755 > --- a/tools/power/pm-graph/bootgraph.py > +++ b/tools/power/pm-graph/bootgraph.py > @@ -333,7 +333,7 @@ def parseKernelLog(): > if(not sysvals.stamp['kernel']): > sysvals.stamp['kernel'] = sysvals.kernelVersion(msg) > continue > - m = re.match('.* setting system clock to (?P.*) UTC.*', msg) > + m = re.match('.* setting system clock to (?P.*) (?:UTC )?\(.*', msg) > if(m): > bt = datetime.strptime(m.group('t'), '%Y-%m-%d %H:%M:%S') > bt = bt - timedelta(seconds=int(ktime)) > -- > 2.21.0 > -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com