Index: openacs-4/packages/acs-lang/tcl/localization-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/localization-procs.tcl,v diff -u -N -r1.25 -r1.26 --- openacs-4/packages/acs-lang/tcl/localization-procs.tcl 7 Aug 2017 23:47:56 -0000 1.25 +++ openacs-4/packages/acs-lang/tcl/localization-procs.tcl 29 Dec 2017 11:13:40 -0000 1.26 @@ -401,11 +401,10 @@ set local_time $time_value - if {[catch { + ad_try { set local_time [db_exec_plsql utc_to_local {}] - } errmsg] - } { - ns_log Warning "lc_time_utc_to_local: Query exploded on time conversion from UTC, probably just an invalid date, $time_value: $errmsg" + } on error {errorMsg} { + ad_log Warning "lc_time_utc_to_local: Query exploded on time conversion from UTC, probably just an invalid date, $time_value: $errorMsg" } if {$local_time eq ""} { @@ -431,11 +430,10 @@ } set utc_time $time_value - if {[catch { + ad_try { set utc_time [db_exec_plsql local_to_utc {}] - } errmsg] - } { - ns_log Warning "lc_time_local_to_utc: Query exploded on time conversion to UTC, probably just an invalid date, $time_value: $errmsg" + } on error {errorMsg} { + ad_log Warning "lc_time_local_to_utc: Query exploded on time conversion to UTC, probably just an invalid date, $time_value: $errorMsg" } if {$utc_time eq ""} { @@ -506,10 +504,10 @@ @param time_value Timestamp in the 'from' timezone, in the ISO datetime format. @return Timestamp in the 'to' timezone, also in ISO datetime format. } { - with_catch errmsg { + ad_try { set time_value [db_exec_plsql convert {}] - } { - ns_log Warning "lc_time_tz_convert: Error converting timezone: $errmsg" + } on error {errorMsg} { + ad_log Warning "lc_time_tz_convert: Error converting timezone: $errorMsg" } return $time_value }