[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: bug in x86/uclibc busybox touch
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2010-12-31 3:50:57
Message-ID: 201012310450.57353.vda.linux () googlemail ! com
[Download RAW message or body]
On Thursday 30 December 2010 03:32, Rob Landley wrote:
> On Tue, Dec 28, 2010 at 7:45 PM, Denys Vlasenko
> <vda.linux@googlemail.com> wrote:
> > On Thursday 16 December 2010 13:54, Natanael Copa wrote:
> >> $ touch -t 0001010000 moo
> >> touch: invalid date '0001010000'
> >>
> >> the above works with coreutils touch and interestingly enough, with
> >> x86_64 uclibc busybox
> >
> > Because 1900-01-01 is a negative Unix time which doesn't fit
> > into 32-bit long.
>
> A 64 bit target shouldn't have the "year 2038" problem. Midnight
> January 1 1970, plus or minus 68 years and change.
>
> > "busybox touch -t 0112130000 file" works,
> > and sets t=-2147475600 (0x80001f70).
> >
> > Previous day, -t 0112130000, doesn't.
>
> If you ls -l the file "moo" after creating it above, its date is
> 01-01-2000. Not 1900.
In busybox touch, it will be 19xx (on 64-bit machines,
where date 1900-01-01 fits into time_t).
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic