Index: openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl,v diff -u -N -r1.68.2.14 -r1.68.2.15 --- openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl 18 Feb 2021 12:45:13 -0000 1.68.2.14 +++ openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl 18 Feb 2021 14:28:59 -0000 1.68.2.15 @@ -308,7 +308,7 @@ ] } -ad_proc -public lang::message::undelete { +ad_proc -private lang::message::undelete { -package_key:required -message_key:required -locale:required @@ -328,7 +328,7 @@ ] } -ad_proc -public lang::message::revert { +ad_proc -private lang::message::revert { {-package_key:required} {-message_key:required} {-locale:required} @@ -358,7 +358,7 @@ $last_overwritten_message } -ad_proc -public lang::message::get_element { +ad_proc -private lang::message::get_element { -package_key:required -message_key:required -locale:required @@ -573,7 +573,7 @@ } } -ad_proc -public lang::message::conflict_count { +ad_proc -private lang::message::conflict_count { {-package_key ""} {-locale ""} } { 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.29.2.14 -r1.29.2.15 --- openacs-4/packages/acs-lang/tcl/localization-procs.tcl 21 Jul 2020 14:02:09 -0000 1.29.2.14 +++ openacs-4/packages/acs-lang/tcl/localization-procs.tcl 18 Feb 2021 14:28:59 -0000 1.29.2.15 @@ -378,7 +378,7 @@ }]] } -ad_proc -public lc_time_fmt_compile { +ad_proc -private lc_time_fmt_compile { fmt locale } { Index: openacs-4/packages/acs-lang/tcl/test/acs-lang-localization-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/test/acs-lang-localization-procs.tcl,v diff -u -N -r1.4.2.7 -r1.4.2.8 --- openacs-4/packages/acs-lang/tcl/test/acs-lang-localization-procs.tcl 15 Feb 2021 13:27:30 -0000 1.4.2.7 +++ openacs-4/packages/acs-lang/tcl/test/acs-lang-localization-procs.tcl 18 Feb 2021 14:28:59 -0000 1.4.2.8 @@ -16,6 +16,12 @@ lc_time_fmt lc_time_utc_to_local lc_time_local_to_utc + lc_clock_to_ansi + lc_time_conn_to_system + lc_time_system_to_conn + lc_time_tz_convert + lang::system::set_timezone + lang::conn::timezone lang::catalog::import lang::catalog::import @@ -88,6 +94,29 @@ set time [lc_time_fmt $short_timestamp "%c" it_IT] aa_equals "format it_IT time" [lrange $time 0 end-1] "Lun 16 Dicembre 2019 12:11" + + set time [lc_clock_to_ansi 1613657099] + aa_equals "lc_clock_to_ansi" $time "2021-02-18 15:04:59" + + set time [lc_time_tz_convert -from Europe/Vienna -to Europe/Vienna -time_value "2021-02-18 15:04:59"] + aa_equals "lc_time_tz_convert form and to Europe/Vienna" $time "2021-02-18 15:04:59" + + set time [lc_time_tz_convert -from Europe/Vienna -to America/New_York -time_value "2021-02-18 15:04:59"] + aa_equals "lc_time_tz_convert form and to Europe/Vienna" $time "2021-02-18 09:04:59" + + # + # There is no easy way to change the conn::timezone. So set the + # system timezone to the lang::conn::timezone to get a + # reproducable result. Since we are running in a transaction, no + # harm is done. + # + lang::system::set_timezone [lang::conn::timezone] + set time [lc_time_conn_to_system "2021-02-18 15:04:59"] + aa_equals "lc_time_conn_to_system" $time "2021-02-18 15:04:59" + + set time [lc_time_system_to_conn "2021-02-18 15:04:59"] + aa_equals "lc_time_system_to_conn" $time "2021-02-18 15:04:59" + } }