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.20 -r1.21 --- openacs-4/packages/acs-lang/tcl/locale-procs.tcl 10 Oct 2003 13:59:22 -0000 1.20 +++ openacs-4/packages/acs-lang/tcl/locale-procs.tcl 14 Oct 2003 07:39:28 -0000 1.21 @@ -561,7 +561,11 @@ return "" } - set timezone [lang::user::timezone] + set timezone {} + if { [ad_conn isconnected] } { + set timezone [lang::user::timezone] + } + if { [empty_string_p $timezone] } { # No user timezone, return the system timezone set timezone [lang::system::timezone] Index: openacs-4/packages/acs-lang/tcl/test/acs-lang-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/test/acs-lang-test-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-lang/tcl/test/acs-lang-test-procs.tcl 18 Sep 2003 13:59:21 -0000 1.7 +++ openacs-4/packages/acs-lang/tcl/test/acs-lang-test-procs.tcl 14 Oct 2003 07:39:28 -0000 1.8 @@ -370,8 +370,13 @@ # Connection timezone aa_equals "Using user timezone" [lang::conn::timezone] $desired_user_timezone + + ad_conn -set isconnected 0 + aa_equals "Fallback to system timezone when no connection" [lang::conn::timezone] $desired_system_timezone + ad_conn -set isconnected 1 + lang::user::set_timezone {} - aa_equals "Fallback to system timezone" [lang::conn::timezone] $desired_system_timezone + aa_equals "Fallback to system timezone when no user pref" [lang::conn::timezone] $desired_system_timezone } { set error_p 1