🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.privacy.anon-server
Article #325485

Re: [OT] Unix Time Stamp - Independence Day 2025 :-)

#325485
From: Stefan Claas
Date: Fri, 14 Jun 2024 13:06
27 lines
1743 bytes
elvis-85792@notatla.org.uk wrote:

> > Anyways, here is a Bing AI generated bash script,
> 
> >  ...
> > timedatectl list-timezones > timezones.txt
> >
> > # Output the local time for the passed Unix Epoch Time in each timezone
> > while IFS= read -r timezone
> > do
> >     local_time=$(TZ=$timezone date -d "@$epoch_time" '+%a %b %d %Y %H:%M:%S %Z')
> >     printf "%-40s %s\n" "$timezone" "$local_time"
> > done < timezones.txt
> 
> That leaves a temp file behind.  Could have read the text from a pipe.
> 
> #!/bin/bash
> timedatectl list-timezones | while read -r timezone
> do
>  echo Got a $timezone
> done

Ah, o.k. that's better.

-- 
Regards
Stefan
Technical Details
Message-ID: <v4hf8t$3v9h2$1@i2pn2.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf9.newsdeef.eu!i2pn2.org!.POSTED!not-for-mail
References: <v49l70$3lvsk$1@i2pn2.org> <slrnv6gs9o.8q8.elvis-85792@notatla.org.uk> <v49um7$3mbci$1@i2pn2.org> <v4fh5j$3t295$1@i2pn2.org> <slrnv6mrf5.rvu.elvis-85792@notatla.org.uk>

Show Full Headers
Complete Article Headers
Message-ID: <v4hf8t$3v9h2$1@i2pn2.org>
Subject: Re: [OT] Unix Time Stamp - Independence Day 2025 :-)
Date: Fri, 14 Jun 2024 15:06:36 +0200
From: Stefan Claas <pollux@tilde.club>
References: <v49l70$3lvsk$1@i2pn2.org> <slrnv6gs9o.8q8.elvis-85792@notatla.org.uk> <v49um7$3mbci$1@i2pn2.org> <v4fh5j$3t295$1@i2pn2.org> <slrnv6mrf5.rvu.elvis-85792@notatla.org.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf9.newsdeef.eu!i2pn2.org!.POSTED!not-for-mail
Newsgroups: alt.privacy.anon-server
Organization: i2pn2 (i2pn.org)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 14 Jun 2024 13:06:37 -0000 (UTC)
Injection-Info: i2pn2.org;
 logging-data="4171298"; mail-complaints-to="usenet@i2pn2.org";
 posting-account="uWi4uQdALkj7ETOfPbhNXfz0+Ra/gM5z6/Fa40dJi9U";
X-Spam-Checker-Version: SpamAssassin 4.0.0
Finger: tilde.club/~pollux/