Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [bug] zsh/datetime strftime bug



On 09/12/2007, antho.charles@xxxxxxxxx <antho.charles@xxxxxxxxx> wrote:
> Hi zsh workers !
>
> I think I found a bug in strftime:
>
> baha@Saito% zsh -f
> Saito%zmodload zsh/datetime
> Saito% strftime '%T %x' $EPOCHSECONDS
> 23:04:17
> Saito% strftime '%T%x' $EPOCHSECONDS
> 23:05:2408.12.2007
> Saito% strftime '%x %T' $EPOCHSECONDS
> 08.12.2007 23:06:02
>
> I don't get the value of %x in the first output. If I loop the strftime
> command, I get sometimes some garbage characters.
>
> Saito% for i in {1..10}; strftime '%T %x' $EPOCHSECONDS && sleep 2
> 23:12:06 �
> 23:12:08
> 23:12:10 �
> 23:12:12

Happens here too, doesn't seem to happen with other combinations like
'%x %T %x' either. I also noticed this just now,
{4:11:47:~code/zsh}% grep parameter\ interface Src/Modules/*.c
Src/Modules/datetime.c: * datetime.c - parameter interface to langinfo
via curses
Src/Modules/langinfo.c: * langinfo.c - parameter interface to langinfo
via curses

I'm guessing it should say 'parameter interface to strftime' or something.

-- 
Mikael Magnusson


Messages sorted by: Reverse Date, Date, Thread, Author