🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.privacy.anon-server
7 messages
7 total messages Started by Stefan Claas Tue, 11 Jun 2024 13:58
[OT] Unix Time Stamp - Independence Day 2025 :-)
#325437
Author: Stefan Claas
Date: Tue, 11 Jun 2024 13:58
6 lines
950 bytes
$ echo -n '68686868' | hex2date
Friday, 04. July 2025 23:48:56 +0000 (UTC)

-- 
Regards
Stefan
Re: [OT] Unix Time Stamp - Independence Day 2025 :-)
#325440
Author: elvis-85792
Date: Tue, 11 Jun 2024 15:46
7 lines
995 bytes
> $ echo -n '68686868' | hex2date
> Friday, 04. July 2025 23:48:56 +0000 (UTC)

You've confused people looking for
25th May
15th August
or any other date.
Re: [OT] Unix Time Stamp - Independence Day 2025 :-)
#325443
Author: D
Date: Tue, 11 Jun 2024 16:30
10 lines
967 bytes
On 11 Jun 2024 15:46:00 GMT, elvis-85792@notatla.org.uk wrote:
>> $ echo -n '68686868' | hex2date
>> Friday, 04. July 2025 23:48:56 +0000 (UTC)
>
>You've confused people looking for
>25th May
>15th August
>or any other date.

it's only "them" doing their sworn duty
Re: [OT] Unix Time Stamp - Independence Day 2025 :-)
#325441
Author: Stefan Claas
Date: Tue, 11 Jun 2024 16:40
17 lines
1281 bytes
elvis-85792@notatla.org.uk wrote:

> > $ echo -n '68686868' | hex2date
> > Friday, 04. July 2025 23:48:56 +0000 (UTC)
> 
> You've confused people looking for
> 25th May
> 15th August
> or any other date.

Oh, sorry Elvis! I thought that nowadays only
a couple of Americans are using a.p.a-s ...

-- 
Regards
Stefan
Re: [OT] Unix Time Stamp - Independence Day 2025 :-)
#325474
Author: Stefan Claas
Date: Thu, 13 Jun 2024 19:26
72 lines
2638 bytes
Stefan Claas wrote:

> elvis-85792@notatla.org.uk wrote:
> 
> > > $ echo -n '68686868' | hex2date
> > > Friday, 04. July 2025 23:48:56 +0000 (UTC)
> > 
> > You've confused people looking for
> > 25th May
> > 15th August
> > or any other date.
> 
> Oh, sorry Elvis! I thought that nowadays only
> a couple of Americans are using a.p.a-s ...
> 

Anyways, here is a Bing AI generated bash script,
which allow to input Unix Epoch Time Stamps in hex
or decimal (-h -d Parameter), or it can be used as
a world clock, when giving no arguments.

#!/bin/bash
# Assume the time is in decimal format by default
time_format="decimal"

# Check if arguments were passed
while getopts ":d:h:" opt; do
  case $opt in
    d)
      epoch_time=$OPTARG
      ;;
    h)
      epoch_time=$((16#$OPTARG))
      time_format="hex"
      ;;
    \?)
      echo "Invalid option: -$OPTARG" >&2
      exit 1
      ;;
    :)
      echo "Option -$OPTARG requires an argument." >&2
      exit 1
      ;;
  esac
done

# Use the current time if no time was passed
if [ -z "$epoch_time" ]; then
    epoch_time=$(date +%s)
fi

# Print the table header
printf "%-40s %s\n" "Timezone" "Local Time"
echo "---------------------------------------------------------------------"

# Write all available timezones to a file
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

-- 
Regards
Stefan



Re: [OT] Unix Time Stamp - Independence Day 2025 :-)
#325479
Author: elvis-85792
Date: Thu, 13 Jun 2024 22:08
19 lines
1750 bytes
> 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
Re: [OT] Unix Time Stamp - Independence Day 2025 :-)
#325485
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads