Re: [Mailman-Users] Rotating Archives

2004-01-13 Thread Alan Batie
} = 4;
$month_tbl{Jun} = 5;
$month_tbl{Jul} = 6;
$month_tbl{Aug} = 7;
$month_tbl{Sep} = 8;
$month_tbl{Oct} = 9;
$month_tbl{Nov} = 10;
$month_tbl{Dec} = 11;

$days_so_far{Jan} = 0;
$days_so_far{Feb} = 31;
$days_so_far{Mar} = 59;
$days_so_far{Apr} = 90;
$days_so_far{May} = 120;
$days_so_far{Jun} = 151;
$days_so_far{Jul} = 181;
$days_so_far{Aug} = 212;
$days_so_far{Sep} = 243;
$days_so_far{Oct} = 273;
$days_so_far{Nov} = 304;
$days_so_far{Dec} = 334;

$sec_per_year = 31536000;
$sec_per_day = 86400;
$sec_per_hour = 3600;
$sec_per_minute = 60;
$timezone = 8;

($d1, $user, $d3, $month, $day, $time, $year) = split(/ +/, $from_space);
($hours, $minutes, $seconds) = split(/:/, $time);
$month_num = $month_tbl{$month};

#  determine the number of seconds since the beginning of the universe
$clock = ($year - 1970) * $sec_per_year;
if ($month ne Jan) {
$clock = $clock + $days_so_far{$month} * $sec_per_day;
}
$clock = $clock + ($day - 1) * $sec_per_day;
$clock = $clock + $hours * $sec_per_hour;
$clock = $clock + $minutes * $sec_per_minute;
$clock = $clock + $seconds;

#  calculate in the leap year fudge factors
if ($year gt 1971) {
$fudge_days = 0;
$fudge_days = int(($year - 1972) / 4);

if (($year % 4) != 0 || (($year % 4) == 0  $month_num  1)) {
$fudge_days++;
}
$clock = $clock + $fudge_days * $sec_per_day;
}

#  calculate in the time shift westward from Greenwich
$clock = $clock + $timezone * $sec_per_hour;

#  worry about daylight savings time
($d1, $d2, $d3, $d4, $d5, $d6, $d7, $d8, $isdst) = localtime(time);
if ($isdst != 0) {
$clock = $clock - $sec_per_hour;
}
return $clock;
}

-- 
Alan Batie   __alan.batie.orgMe
alan at batie.org\/www.qrd.org The Triangle
PGPFP DE 3C 29 17 C0 49 7A\  / www.pgpi.com   The Weird Numbers
27 40 A5 3C 37 4A DA 52 B9 \/  spamassassin.taint.org  NO SPAM!

To announce that there must be no criticism of the President, or that we
are to stand by the President, right or wrong, is not only unpatriotic
and servile, but is morally treasonable to the American public.
-Theodore Roosevelt, 26th US President (1858-1919)


pgp0.pgp
Description: PGP signature
--
Mailman-Users mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/

This message was sent to: [EMAIL PROTECTED]
Unsubscribe or change your options at
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org


[Mailman-Users] variable substitution

2004-01-11 Thread Alan Batie
-BEGIN PGP SIGNED MESSAGE-

One of my list owners is using identical message footers in two different
lists, but one is getting expanded and the other isn't.  I'm running
mailman 2.1.3, and thought maybe the personalize setting needed set, but
config_list -o doesn't put in a personalize setting, and -i won't accept
it.  I think personalize might be something beyond basic variable expansion
anyhow.  Any clue to what I'm missing?  Thanks!

- -- 
Alan Batie   __alan.batie.orgMe
alan at batie.org\/www.qrd.org The Triangle
PGPFP DE 3C 29 17 C0 49 7A\  / www.pgpi.com   The Weird Numbers
27 40 A5 3C 37 4A DA 52 B9 \/  spamassassin.taint.org  NO SPAM!

To announce that there must be no criticism of the President, or that we
are to stand by the President, right or wrong, is not only unpatriotic
and servile, but is morally treasonable to the American public.
- -Theodore Roosevelt, 26th US President (1858-1919)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2 (FreeBSD)

iQCVAwUBQAIdBov4wNua7QglAQG3YgP+L928zv5ZGUx2EhGR/eAvUvRBRjMGte+T
xFW4BJyzpbv1zlr4ogvdX4r9qPsjeWRoIFDYAoVJ5h8lqoUiwMCp12hVttahU3cd
3WbwkHulfttE/3wrVJelTfv4Z5F3XRxkrCIGHCZ+ukBDi7YKG4DY5eBM0fEwuSZ4
zxNgIrs/Q9w=
=1Dhh
-END PGP SIGNATURE-

--
Mailman-Users mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/

This message was sent to: [EMAIL PROTECTED]
Unsubscribe or change your options at
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org


[Mailman-Users] unpack tuple of wrong size

2003-08-28 Thread Alan Batie
I love mailman, but the upgrade from 2.0 to 2.1 blindsided me.  Partly
my fault for just doing a make install without reading the upgrade
docs, but I didn't expect such major changes in a point release.  After
getting everything working again, well, everything isn't.  Some lists
are ok, but some are not allowing admins to login:

We're sorry, we hit a bug!

If you would like to help us identify the problem, please email a copy of this page to 
the webmaster for this site with a description of what happened. Thanks!
Traceback:

Traceback (most recent call last):
  File /usr/local/mailman/scripts/driver, line 87, in run_main
main()
  File /usr/local/mailman/Mailman/Cgi/admindb.py, line 226, in main
num = show_pending_subs(mlist, form)
  File /usr/local/mailman/Mailman/Cgi/admindb.py, line 264, in show_pending_subs
pendingsubs = mlist.GetSubscriptionIds()
  File /usr/local/mailman/Mailman/ListAdmin.py, line 163, in GetSubscriptionIds
return self.__getmsgids(SUBSCRIPTION)
  File /usr/local/mailman/Mailman/ListAdmin.py, line 155, in __getmsgids
ids = [k for k, (type, data) in self.__db.items() if type == rtype]
ValueError: unpack tuple of wrong size


I can handle basic python, but I am lost when it comes to dealing with
the objects and formats...  I'm assuming these lists didn't get converted
properly, but I ran withlist convert and it seems happy with them...

-- 
Alan Batie   __alan.batie.orgMe
alan at batie.org\/www.qrd.org The Triangle
PGPFP DE 3C 29 17 C0 49 7A\  / www.pgpi.com   The Weird Numbers
27 40 A5 3C 37 4A DA 52 B9 \/  spamassassin.taint.org  NO SPAM!

To announce that there must be no criticism of the President, or that we
are to stand by the President, right or wrong, is not only unpatriotic
and servile, but is morally treasonable to the American public.
-Theodore Roosevelt, 26th US President (1858-1919)


pgp0.pgp
Description: PGP signature
--
Mailman-Users mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/

This message was sent to: [EMAIL PROTECTED]
Unsubscribe or change your options at
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org