[LON-CAPA-cvs] cvs: loncom(version_2_8_X) /lonnet/perl lonnet.pm
raeburn
raeburn@source.lon-capa.org
Mon, 05 Jan 2009 16:29:24 -0000
raeburn Mon Jan 5 16:29:24 2009 EDT
Modified files: (Branch: version_2_8_X)
/loncom/lonnet/perl lonnet.pm
Log:
- Backport 1.983.
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.976.2.5 loncom/lonnet/perl/lonnet.pm:1.976.2.6
--- loncom/lonnet/perl/lonnet.pm:1.976.2.5 Mon Jan 5 16:28:11 2009
+++ loncom/lonnet/perl/lonnet.pm Mon Jan 5 16:29:24 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.976.2.5 2009/01/05 16:28:11 raeburn Exp $
+# $Id: lonnet.pm,v 1.976.2.6 2009/01/05 16:29:24 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -177,6 +177,20 @@
return 0;
}
+sub get_server_timezone {
+ my ($cnum,$cdom) = @_;
+ my $home=&homeserver($cnum,$cdom);
+ if ($home ne 'no_host') {
+ my $cachetime = 24*3600;
+ my ($timezone,$cached)=&is_cached_new('servertimezone',$home);
+ if (defined($cached)) {
+ return $timezone;
+ } else {
+ my $timezone = &reply('servertimezone',$home);
+ return &do_cache_new('servertimezone',$home,$timezone,$cachetime);
+ }
+ }
+}
# -------------------------------------------------- Non-critical communication
sub subreply {