From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6800 invoked by alias); 17 Oct 2011 05:45:15 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16493 Received: (qmail 17829 invoked from network); 17 Oct 2011 05:45:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.216.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=yT/SmjX1xeeZVF50IF29UcqU19cRBC3pgzOVO9uTyOg=; b=xvGafRUX4b5+NPZPO/tj/91w2wEcO+96lu3OQROjA6y/Vaz6CxPaihpF0R77DnmfwP tMLO7oewWPaSwG70mZc8K3v9emeexaOqwvdkm2XQ+YcjZBF4RvljA2xwcTnSxIQWGMgl vGWpybdIOM7UCDlRMFwD/Mp/HIpPTKAemJ6VQ= MIME-Version: 1.0 Sender: luomat@gmail.com From: TJ Luoma Date: Mon, 17 Oct 2011 01:36:36 -0400 X-Google-Sender-Auth: FmncMjrwTPEmFnT4eRlNGtv7sEY Message-ID: Subject: can zsh / strftime do "date math"? To: Zsh Users Content-Type: text/plain; charset=UTF-8 I use the 'gdate' program the from the GNU coreutils to do "date math" (I don't know if that's the right term or not). For example, if I wanted to know the time would be in 17 hours, 14 minutes, and 6 seconds, I would use gdate --date "+ 17 hours 14 minutes 06 seconds" I can also use the various '%' arguments to format the output, like so gdate --date "+ 17 hours 14 minutes 06 seconds" '+%Y%m%d'` I'm wondering if there's any way of doing the same thing with zsh. TjL