From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.net.au (8.7/8.7) with SMTP id HAA00490 for ; Sat, 30 Sep 1995 07:14:11 +1000 (EST) Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA12280 (5.65c/Gatech-10.0-IDA for ); Fri, 29 Sep 1995 17:12:43 -0400 Received: by math (5.x/SMI-SVR4) id AA00709; Fri, 29 Sep 1995 17:05:38 -0400 Old-Return-Path: Resent-Date: Fri, 29 Sep 1995 15:08:05 -0600 Old-Return-Path: Date: Fri, 29 Sep 1995 15:08:05 -0600 Message-Id: <9509292108.AA02931@revelle.cdc.noaa.gov> From: Mark Borges To: ZSH users mailing list Subject: offset calendar days Organization: CIRES, University of Colorado X-Attribution: mb Resent-Message-Id: <"RMXvY.0.nA.P-5Rm"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/100 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu [ I apologize for this not being a strictly zsh question, but I've exhausted my other resources, and as a last resort am tapping the expertise of this list. ] I'd like to retrieve a calendar date offset in the future (or past). I vaguely remembered one could do this by fiddling with the TZ environment variable, but I don't know how to interpret the [+-]N argument. For instance, $ TZ=MST7MDT date Fri Sep 29 14:50:17 MDT 1995 $ TZ=MST7MDT-1 date Fri Sep 29 21:50:22 MDT 1995 # why didn't I get 15:50 here? OK, maybe it isn't hours: $ TZ=MST7MDT-24 date Sat Sep 30 20:51:13 MDT 1995 $ TZ=MST7MDT-48 date Sun Oct 1 20:51:16 MDT 1995 $ TZ=MST7MDT-72 date Mon Oct 2 20:51:22 MDT 1995 # but this seems to indicate it is $ TZ=MST7MDT-18 date # using 18 gives me tomorrow at this time Sat Sep 30 14:50:41 MDT 1995 $ TZ=MST7MDT-36 date Sun Oct 1 08:50:55 MDT 1995 Anyone have any ideas or pointers? (I've checked our man pages for date, time, timezone, stime, ctime, looked in /usr/share/lib/zoneinfo/, and came up empty). Thanks, -mb-