lc_time_system_to_conn (public)

 lc_time_system_to_conn time_value

Defined in packages/acs-lang/tcl/localization-procs.tcl

Converts a date from the system (database) to the connection's timezone, using the OpenACS timezone setting and user's preference

Parameters:
time_value (required)
Timestamp from the database in the ISO datetime format.
Returns:
Timestamp in conn's local time, also in ISO datetime format.

Testcases:
lang_test__lc_procs
Source code:
    if { ![ns_conn isconnected] } {
        return $time_value
    }

    set system_tz [lang::system::timezone]
    set conn_tz [lang::conn::timezone]

    if { $conn_tz eq "" || $system_tz eq $conn_tz } {
        return $time_value
    }

    return [lc_time_tz_convert -from $system_tz -to $conn_tz -time_value $time_value]
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-lang/tcl/localization-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: