From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.0.0.0/16 X-Spam-Status: No, score=-3.3 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 8E00A202A0 for ; Sun, 19 Nov 2017 22:16:34 +0000 (UTC) Received: from localhost ([::1]:54546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eGXtA-0003oW-Oq for e@80x24.org; Sun, 19 Nov 2017 17:16:32 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eGXt9-0003oF-BQ for dtas-all@nongnu.org; Sun, 19 Nov 2017 17:16:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eGXt6-0006bf-4p for dtas-all@nongnu.org; Sun, 19 Nov 2017 17:16:31 -0500 Received: from dcvr.yhbt.net ([64.71.152.64]:38020) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eGXt5-0006b6-V4 for dtas-all@nongnu.org; Sun, 19 Nov 2017 17:16:28 -0500 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id C3E00202A0 for ; Sun, 19 Nov 2017 22:16:23 +0000 (UTC) From: Eric Wong To: dtas-all@nongnu.org Subject: [PATCH] console: ensure time calculations are done in UTC Date: Sun, 19 Nov 2017 22:16:23 +0000 Message-Id: <20171119221623.29812-1-e@80x24.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 64.71.152.64 X-BeenThere: dtas-all@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: duct tape audio suite List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dtas-all-bounces+e=80x24.org@nongnu.org Sender: "dtas-all" We must do this if the user does not use UTC in their time zone, otherwise things could get a bit wacky in the display. --- bin/dtas-console | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/dtas-console b/bin/dtas-console index c65e616..18f6c09 100755 --- a/bin/dtas-console +++ b/bin/dtas-console @@ -173,11 +173,11 @@ def may_fail(res, events) Curses.setpos(lineno += 1, 0) Curses.clrtoeol Curses.addstr(infile) - total = " [#{Time.at(samples / rate).strftime(tfmt)}]" if samples != 0 + total = " [#{Time.at(samples / rate).utc.strftime(tfmt)}]" if samples != 0 Curses.setpos(lineno += 1, 0) Curses.clrtoeol if rate != 0 - Curses.addstr("#{Time.at(elapsed).strftime(tfmt)}#{total} #{fmt}") + Curses.addstr("#{Time.at(elapsed).utc.strftime(tfmt)}#{total} #{fmt}") else Curses.addstr("#{elapsed} samples #{total} #{fmt}") end -- EW