Re: [gentoo-user] Converting Unix time to local time

2020-11-24 Thread Philip Webb
On Monday, 23 November 2020 21:47:11 GMT Jack wrote: > For many years, I've had this small script in my home directory - > unfortunately I rarely remember to use it. I have no idea > where I got it, but it's got a timestamp of about four years ago. > However, now that I actually look at it, > the

Re: [gentoo-user] Converting Unix time to local time

2020-11-24 Thread Peter Humphrey
On Tuesday, 24 November 2020 09:28:13 GMT I wrote: > There should be a one-liner in awk too. Someone will come along in a minute > and tell us. At least, I hope so because I'd like to use it too. I should have added my thanks for the script. Rude of me. -- Regards, Peter.

Re: [gentoo-user] Converting Unix time to local time

2020-11-24 Thread Peter Humphrey
On Monday, 23 November 2020 21:47:11 GMT Jack wrote: > For many years, I've had this small script in my home directory - > unfortunately I rarely remember to use it. I have no idea where I got > it, but it's got a timestamp of about four years ago. However, now > that I actually look at it, the

Re: [gentoo-user] Converting Unix time to local time

2020-11-23 Thread Dale
Jack wrote: > On 2020.11.23 15:00, Dale wrote: >> Matt Connell (Gmail) wrote: >> > On Mon, 2020-11-23 at 19:24 +0100, Dr Rainer Woitok wrote: >> >> *blush*  Even though I'm using "date"  since umpteen years,  up to >> now I >> >> was not aware of this "@..." syntax.  You're perfectly right, >> that

Re: [gentoo-user] Converting Unix time to local time

2020-11-23 Thread Jack
On 2020.11.23 15:00, Dale wrote: Matt Connell (Gmail) wrote: > On Mon, 2020-11-23 at 19:24 +0100, Dr Rainer Woitok wrote: >> *blush* Even though I'm using "date" since umpteen years, up to now I >> was not aware of this "@..." syntax. You're perfectly right, that's ex- >> actly what I wa

Re: [gentoo-user] Converting Unix time to local time

2020-11-23 Thread Dale
Matt Connell (Gmail) wrote: > On Mon, 2020-11-23 at 19:24 +0100, Dr Rainer Woitok wrote: >> *blush* Even though I'm using "date" since umpteen years, up to now I >> was not aware of this "@..." syntax. You're perfectly right, that's ex- >> actly what I was looking for. > I wasn't either, until

Re: [gentoo-user] Converting Unix time to local time

2020-11-23 Thread Matt Connell (Gmail)
On Mon, 2020-11-23 at 19:24 +0100, Dr Rainer Woitok wrote: > *blush* Even though I'm using "date" since umpteen years, up to now I > was not aware of this "@..." syntax. You're perfectly right, that's ex- > actly what I was looking for. I wasn't either, until I read the man page. Just goes to

Re: [gentoo-user] Converting Unix time to local time

2020-11-23 Thread Dr Rainer Woitok
Matt and also Mathew, On Monday, 2020-11-23 11:46:56 -0600, Matt Connell (Gmail) wrote: > ... > Is the basic `date` from coreutils sufficient? If so, no need to > reinvent the wheel, unless I'm misunderstanding your need. > > Example: > > $ date --date='@21' > 2037-12-14T17:00:44 CST

Re: [gentoo-user] Converting Unix time to local time

2020-11-23 Thread Matt Connell (Gmail)
On Mon, 2020-11-23 at 18:28 +0100, Dr Rainer Woitok wrote: > looking for a small, fast utility (preferably written in C) accepting a > Unix time (seconds since 1970-01-01) as argument and printing the corr- > esponding local time to standard output. Is the basic `date` from coreutils sufficient?

Re: [gentoo-user] Converting Unix time to local time

2020-11-23 Thread tedheadster
You might be able to use this shell command: TZ=US/Pacific date --date='@2147483647' - Matthew

Re: [gentoo-user] Converting Unix time to local time

2020-11-23 Thread Jack
On 11/23/20 12:28 PM, Dr Rainer Woitok wrote: Greetings, looking for a small, fast utility (preferably written in C) accepting a Unix time (seconds since 1970-01-01) as argument and printing the corr- esponding local time to standard output. Any pointers? Sincerely, Rainer I'm not aware

[gentoo-user] Converting Unix time to local time

2020-11-23 Thread Dr Rainer Woitok
Greetings, looking for a small, fast utility (preferably written in C) accepting a Unix time (seconds since 1970-01-01) as argument and printing the corr- esponding local time to standard output. Any pointers? Sincerely, Rainer