* Re: offset calendar days
[not found] ` <9509292153.AA15311@turan.elte.hu>
@ 1995-09-30 5:06 ` Mark Borges
1995-09-30 5:17 ` Zefram
0 siblings, 1 reply; 3+ messages in thread
From: Mark Borges @ 1995-09-30 5:06 UTC (permalink / raw)
To: hzoli; +Cc: ZSH mailing list
>> Zoltan Hidvegi(ZH) wrote on Fri, 29 Sep 1995 22:53:09 +0100 (MET):
ZH> As I know, if there is a +/- number in the TZ, it is taken as an
ZH> offset to GMT and the leading part of the variable is ignored.
ZH> E.g. FOO-1 is the same as GMT-1.
Yes, you are exactly right. Thanks!
Unfortunately, in playing with this I think I discoverd a small bug
(or at least ksh incompatability) in zsh:
------------------------------------------------------------------------------
charney$ ksh
$ TZ=GMT-$((18+$((${2:-1}-1))*24)) date +%j
273
$ ^D
charney$ echo $ZSH_VERSION
2.6-beta10-hzoli10.2
charney$ TZ=GMT-$((18+$((${2:-1}-1))*24)) date +%j
zsh: ')' expected
------------------------------------------------------------------------------
If not a bug, is there an alternate syntax I can use in zsh?
-mb-
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: offset calendar days
1995-09-30 5:06 ` offset calendar days Mark Borges
@ 1995-09-30 5:17 ` Zefram
1995-09-30 15:41 ` Mark Borges
0 siblings, 1 reply; 3+ messages in thread
From: Zefram @ 1995-09-30 5:17 UTC (permalink / raw)
To: Mark Borges; +Cc: Z Shell workers mailing list
>charney$ echo $ZSH_VERSION
>2.6-beta10-hzoli10.2
>charney$ TZ=GMT-$((18+$((${2:-1}-1))*24)) date +%j
>zsh: ')' expected
>
>------------------------------------------------------------------------------
>If not a bug, is there an alternate syntax I can use in zsh?
What's wrong with $((18+(${2:-1}-1)*24)) ? And the line above works
for me (2.6-beta11-test7).
-zefram
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: offset calendar days
1995-09-30 5:17 ` Zefram
@ 1995-09-30 15:41 ` Mark Borges
0 siblings, 0 replies; 3+ messages in thread
From: Mark Borges @ 1995-09-30 15:41 UTC (permalink / raw)
To: A.Main; +Cc: ZSH mailing list
>> Zefram (Z) wrote on Sat, 30 Sep 1995 06:17:42 +0100 (BST):
>> charney$ echo $ZSH_VERSION
>> 2.6-beta10-hzoli10.2
>> charney$ TZ=GMT-$((18+$((${2:-1}-1))*24)) date +%j
>> zsh: ')' expected
>> If not a bug, is there an alternate syntax I can use in zsh?
Z> What's wrong with $((18+(${2:-1}-1)*24)) ?
Err, nothing, it should work too but it doesn't:
$ TZ=GMT-$((18+(${2:-1}-1)*24)) date +%j
zsh: ')' expected
Z> And the line above works for me (2.6-beta11-test7).
Yes, you're right. It works in 2.6-b10 as well, so I presume the bug
is restricted to the hzoli releases (though I've only verified up to
hzoli10.2). I should have checked this prior to my original post to
the list.
Thanks for the info.
-mb-
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1995-09-30 15:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <9509292108.AA02931@revelle.cdc.noaa.gov>
[not found] ` <9509292153.AA15311@turan.elte.hu>
1995-09-30 5:06 ` offset calendar days Mark Borges
1995-09-30 5:17 ` Zefram
1995-09-30 15:41 ` Mark Borges
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).