bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: date bug


From: Philip Rowlands
Subject: Re: date bug
Date: Wed, 8 Jul 2009 13:57:59 +0100 (BST)
User-agent: Alpine 1.10 (DEB 962 2008-03-14)

On Tue, 7 Jul 2009, David wrote:

whist using "date" in a bash script there seems to be a problem returning the hour for 09:20

t_hr=$(date +%l) (small L) does not return "9" from 09:20 or any time between 09:00 and 09:30

t_hr=$(date +%-I) works fine

I needed the hour with out the padded zero

I can't reproduce this:

$ date -d 09:00
Wed Jul  8 09:00:00 IST 2009
address@hidden:~$ date -d 09:00 +%l
 9


Please try the following commands and report the results:
date --version
date 08:50 +%l
date 09:00 +%l
date 09:15 +%l
date 09:30 %+l
date 09:40 +%l
env -i date -u -d 09:00 +%l


Cheers,
Phil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]