Back to the main page

Mailing List Logs for ShadowRN

From: Mark Imbriaco <mark@********.IP.NET>
Subject: Re: Admin Discussion in ShadowTK
Date: Wed, 5 Oct 1994 19:29:41 -0500
On Wed, 5 Oct 1994, Tim Skirvin wrote:

> > Note: I did write a good time/date format script. I just lost it.
> > I'm writing a C program that will do the same thing. Really,
> > honestly, I am.
>
> He did. I think I have it sitting around somewhere...I'll see if I can
> find it.

Well, since everyone seems so interested in a script to help
out with this, I whipped up a little perl program to do just
that. It allows you to configure whether you want American
or European format for the T/D stamp, and allows you to put
a Character name in as well if you so desire. Let me know
what you think, and feel free to modify it to you heart's
content... I don't care. :-)

+++ Included Perl Script: shadow_date

#!/usr/local/bin/perl
#
# Shadow_Date, a perl ShadowTk mailing list helper.
#
# shadow_date was thrown together on October 5, 1994 by Mark Imbriaco.
# You may freely distribute this in any form you like, even if you
# modify it. I don't care. :) <Just send me a copy!>
#
# USAGE: To use this program, simply edit the user options below
# execute it from the command line, and paste the output of
# the execution into your mail message.
#
# Mark Imbriaco <mark@***.ip.net>
#

# ---------------- Begin User editable variables. ----------------

$GMTDIFF = 5; # Number that must be added to your local time to
# get GMT. (In hours, and can be a negative number.)

$FORMAT = 1; # 1 = American Post, 2 = European Post.

$TKNAME = ""; # Name of the ShadowTalk Character you will be
# posting as. (Optional)

# ---------------- End User editable variables. ----------------

require "ctime.pl"; # This program requires the ctime.pl library to
# be on your system. (Standard with perl installation,
# so you shouldn't have a problem here.)

%month_key = (
'Jan', '1', 'Feb', '2', 'Mar', '3', 'Apr', '4', 'May', '5',
'Jun', '6', 'Jul', '7', 'Aug', '8', 'Sep', '9', 'Oct', '10',
'Nov', '11', 'Dec', '12',
);



$_ = &ctime(time);

$_ =~ s+ + 0+;
$_ =~ s+Mon |Tue |Wed |Thu |Fri |Sat |Sun ++;
$_ =~ s+ +:+g;
if (/(...):(..):(..):(..):(..):(....)/) {
$month = $1; $day = $2; $hour = $3; $min = $4; $sec = $5; $year = $6;
}

$hour = $hour + $GMTDIFF;

if ($FORMAT == "1") {
$month = $month_key{"$month"};
$year = $year + 61;
$year =~ s+.{2}++;
print "]<<<<<\n --$TKNAME <
$hour:$min:$day/$month:$day:$year >\n";
} elsif ($FORMAT == "2") {
print "]<<<<<\n --$TKNAME <
$hour:$min:$day/$day-$month-$year >\n";
}

+++ End included Perl Script.

Hope you like this!

mark

_____ _ |\ o|\ | ______ I n t e r n e t P r e s e n c e & Publishing
| / | \ || \ |\ |__ | 1700 World Trade Center ofc: 804.446.9060
| \_ |_/.||_/.| \|\_ | Norfolk, Virginia 23510 fax: 804.446.9061
| | www: http://www.ip.net/ email: mark@***.ip.net
============================================================================
(GEEK CODE 2.1) GB/GCS/GE d? H s g+(-) !p au+ a- w+ v++ C++++
UX(L)(B)(A)(S)(I)(V)++++$ P++++$ L+++($) 3+ E+ N++ K++
W--- M+ V -po+ Y++ t+@ 5+++ j++ R+++ G+('''') tv+ b+++ D++
B--- e+(*) u+ h+(*) f+ r++ n---(----) x+

Disclaimer

These messages were posted a long time ago on a mailing list far, far away. The copyright to their contents probably lies with the original authors of the individual messages, but since they were published in an electronic forum that anyone could subscribe to, and the logs were available to subscribers and most likely non-subscribers as well, it's felt that re-publishing them here is a kind of public service.