Index: openacs-4/packages/acs-lang/tcl/locale-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/locale-procs.tcl,v diff -u -r1.21 -r1.22 --- openacs-4/packages/acs-lang/tcl/locale-procs.tcl 14 Oct 2003 07:39:28 -0000 1.21 +++ openacs-4/packages/acs-lang/tcl/locale-procs.tcl 15 Oct 2003 11:21:53 -0000 1.22 @@ -338,6 +338,11 @@ return [string range [locale -package_id $package_id -site_wide=$site_wide_p] 0 1] } + +ad_proc -private lang::user::timezone_no_cache {user_id} { + return [db_string select_user_timezone {} -default ""] +} + ad_proc -public lang::user::timezone {} { Get the user's timezone. Returns the empty string if the user has no timezone set. @@ -349,7 +354,7 @@ return "" } - return [db_string select_user_timezone {} -default ""] + return [util_memoize [list lang::user::timezone_no_cache $user_id]] } ad_proc -public lang::user::set_timezone { @@ -369,6 +374,7 @@ error "User not logged in" } else { db_dml set_user_timezone {} + util_memoize_flush [list lang::user::timezone_no_cache $user_id] } } Index: openacs-4/packages/acs-lang/tcl/locale-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/locale-procs.xql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-lang/tcl/locale-procs.xql 18 Aug 2003 08:08:33 -0000 1.7 +++ openacs-4/packages/acs-lang/tcl/locale-procs.xql 15 Oct 2003 11:21:53 -0000 1.8 @@ -85,7 +85,7 @@ - + select timezone from user_preferences