2.11bsd date is 2019, I didn't think that was possible!

105 visualizações
Pular para a primeira mensagem não lida

Randy Merkel

não lida,
3 de mar. de 2023, 23:40:1603/03/2023
para [PiDP-11]
Just noticed the 2.11bsd's date is post 1999. How is that possible? Anyway to supply yyyy to the date command?

Until then, using 1995 so that the weekdays and dates line up ;)

- Randy

Johnny Billquist

não lida,
4 de mar. de 2023, 07:29:1804/03/2023
para pid...@googlegroups.com
Hi.
It's actually a bit more simple than that. If you give a year before
1970, it will assume it's in the 21st century.

So:

date 2303041328

means

2023-03-04 13:28

Before 2070 we need to fix this. ;-)

Johnny

--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: b...@softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol

Warner Losh

não lida,
4 de mar. de 2023, 22:17:4004/03/2023
para Johnny Billquist, pid...@googlegroups.com
On Sat, Mar 4, 2023 at 5:29 AM Johnny Billquist <b...@softjar.se> wrote:
Hi.

On 2023-03-04 05:40, Randy Merkel wrote:
> Just noticed the 2.11bsd's date is post 1999. How is that possible?
> Anyway to supply yyyy to the date command?
>
> Until then, using 1995 so that the weekdays and dates line up ;)

It's actually a bit more simple than that. If you give a year before
1970, it will assume it's in the 21st century.

So:

date 2303041328

means

2023-03-04 13:28

Before 2070 we need to fix this. ;-)

I don't think time_t has been bumped to 32-bits yet, has it? That puts the
gotta do something about time date rather close, in 2036...

Warner

Johnny Billquist

não lida,
5 de mar. de 2023, 04:42:3605/03/2023
para Warner Losh, pid...@googlegroups.com
You guessed wrong.

From /usr/include/sys/types.h

typedef long time_t;

So it is 32 bits. However, unless I remember wrong, it is the 32-bit
time that will wrap in 2036. So we should go unsigned before then.

Warner Losh

não lida,
5 de mar. de 2023, 09:56:3705/03/2023
para Johnny Billquist, [PiDP-11]


On Sun, Mar 5, 2023, 2:42 AM Johnny Billquist <b...@softjar.se> wrote:


On 2023-03-05 04:17, Warner Losh wrote:
>
>
> On Sat, Mar 4, 2023 at 5:29 AM Johnny Billquist <b...@softjar.se
> <mailto:b...@softjar.se>> wrote:
>
>     Hi.
>
>     On 2023-03-04 05:40, Randy Merkel wrote:
>      > Just noticed the 2.11bsd's date is post 1999. How is that possible?
>      > Anyway to supply yyyy to the date command?
>      >
>      > Until then, using 1995 so that the weekdays and dates line up ;)
>
>     It's actually a bit more simple than that. If you give a year before
>     1970, it will assume it's in the 21st century.
>
>     So:
>
>     date 2303041328
>
>     means
>
>     2023-03-04 13:28
>
>     Before 2070 we need to fix this. ;-)
>
>
> I don't think time_t has been bumped to 32-bits yet, has it? That puts the
> gotta do something about time date rather close, in 2036...

You guessed wrong.

From /usr/include/sys/types.h

typedef long    time_t;

So it is 32 bits. However, unless I remember wrong, it is the 32-bit
time that will wrap in 2036. So we should go unsigned before then.

Yea. I spoke wrong. Bumped to 64 bits is what I meant. It's unclear how well unsigned will work... but it is the easiest thing to do.

Warner

Randy Merkel

não lida,
11 de mar. de 2023, 20:15:0811/03/2023
para [PiDP-11]
Thanks for the info! Now running 2.11 BSD in 2023!
Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem