zsh-workers
 help / color / mirror / code / Atom feed
From: Goran Larsson <hoh@lorelei.approve.se>
To: Peter.Bousfield@wmc.com.au
Cc: zsh-workers@math.gatech.edu
Subject: Re: date bug in zsh 3.0.5
Date: Wed, 30 Dec 1998 16:57:31 +0100 (MET)	[thread overview]
Message-ID: <m0zvO03-000X32C@mailgw.approve.se> (raw)
In-Reply-To: <B0001133321@bell04.its.wmc.com.au>

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.



      reply	other threads:[~1998-12-30 16:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-30  6:59 Bousfield Peter
1998-12-30 15:57 ` Goran Larsson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m0zvO03-000X32C@mailgw.approve.se \
    --to=hoh@lorelei.approve.se \
    --cc=Peter.Bousfield@wmc.com.au \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).