From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20326 invoked by alias); 26 Nov 2012 16:21:07 -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: 17443 Received: (qmail 9861 invoked from network); 26 Nov 2012 16:21:04 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at schrab.com designates 50.116.43.67 as permitted sender) Date: Mon, 26 Nov 2012 11:15:18 -0500 From: Aaron Schrab To: zsh-users@zsh.org Subject: Re: Date prompt expansion Message-ID: <20121126161518.GA3937@pug.qqx.org> Mail-Followup-To: zsh-users@zsh.org References: <50B35385.8040409@internecto.net> <20121126114659.7ec8f1a8@pwslap01u.europe.root.pri> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20121126114659.7ec8f1a8@pwslap01u.europe.root.pri> User-Agent: Mutt/1.5.21 (2011-07-01) At 11:46 +0000 26 Nov 2012, Peter Stephenson wrote: >Up to oddities with leap seconds, you can do it by > >zmodload zsh/datetime >strftime -s yesterdaysDay "+%d" $(( EPOCHSECONDS - 24 * 60 * 60 )) Unless I'm missing something, that would also have problems around the beginning and end of daylight saving time, for a whole hour in each case rather than just for a single second as with leap seconds.