* date bug in zsh 3.0.5
@ 1998-12-30 6:59 Bousfield Peter
1998-12-30 15:57 ` Goran Larsson
0 siblings, 1 reply; 2+ messages in thread
From: Bousfield Peter @ 1998-12-30 6:59 UTC (permalink / raw)
To: 'zsh-workers@math.gatech.edu'
Hello,
The %W prompt variable does not seem to work correctly in zsh 3.0.5
We are running solaris 2.6 and have zsh 3.0.5.
Setting your prompt to %W, and then setting the date to after 1/1/2000 gives
incorrect output. eg:
Sun Microsystems Inc. SunOS 5.6 Generic August 1997
[1] bousfipd@y2ktest1.y2k-sol:/ % sudo date 123123591999
Password:
Friday December 31 23:59:00 WST 1999
[2] bousfipd@y2ktest1.y2k-sol:/ % date
Friday December 31 23:59:03 WST 1999
[3] bousfipd@y2ktest1.y2k-sol:/ % export prompt=%W
12/31/99date
Friday December 31 23:59:12 WST 1999
12/31/99date
Saturday January 1 00:00:04 WST 2000
01/01/:0
The century is display as :0 not 00!
Thankyou for your time.
peter bousfield
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: date bug in zsh 3.0.5
1998-12-30 6:59 date bug in zsh 3.0.5 Bousfield Peter
@ 1998-12-30 15:57 ` Goran Larsson
0 siblings, 0 replies; 2+ messages in thread
From: Goran Larsson @ 1998-12-30 15:57 UTC (permalink / raw)
To: Peter.Bousfield; +Cc: zsh-workers
On 30 Dec, Bousfield Peter wrote:
> The %W prompt variable does not seem to work correctly in zsh 3.0.5
> The century is display as :0 not 00!
The century isn't displayed at all, the years within the century is.
To fix this edit Src/utils.c and replace this
case 'y':
*buf++ = '0' + tm->tm_year / 10;
*buf++ = '0' + tm->tm_year % 10;
break;
with this
case 'y':
*buf++ = '0' + ( tm->tm_year / 10 ) % 10; /* Y2K fix */
*buf++ = '0' + tm->tm_year % 10;
break;
This bug is fixed in version 3.1.5.
--
Goran Larsson hoh@approve.se
I was an atheist, http://home.swipnet.se/hoh/
until I found out I was God.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-12-30 16:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-30 6:59 date bug in zsh 3.0.5 Bousfield Peter
1998-12-30 15:57 ` Goran Larsson
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).