lc_time_local_to_utc (public)

 lc_time_local_to_utc time_value [ tz ]

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

Converts a local time to a UTC time for the specified timezone.

Parameters:
time_value - Local time in the ISO datetime format, YYYY-MM-DD HH24:MI:SS
tz (optional) - Valid timezone as supported by the Tcl Clock command or must exist in tz_data table.
Returns:
UTC time.

Partial Call Graph (max 5 caller/called nodes):
%3 test_lang_test__lc_procs lang_test__lc_procs (test acs-lang) lc_time_local_to_utc lc_time_local_to_utc test_lang_test__lc_procs->lc_time_local_to_utc test_lang_test__lc_timezones lang_test__lc_timezones (test acs-lang) test_lang_test__lc_timezones->lc_time_local_to_utc lang::conn::timezone lang::conn::timezone (public) lc_time_local_to_utc->lang::conn::timezone lc_time_tz_convert lc_time_tz_convert (public) lc_time_local_to_utc->lc_time_tz_convert calendar::item::get calendar::item::get (public) calendar::item::get->lc_time_local_to_utc

Testcases:
lang_test__lc_procs, lang_test__lc_timezones
Source code:
    if { $tz eq "" } {
        set tz [lang::conn::timezone]
    }

    set utc_time [lc_time_tz_convert -from $tz -to UTC -time_value $time_value]

    if {$utc_time eq ""} {
        #
        # An empty result normally means a broken date or timezone. We
        # throw a warning in this case.
        #
        ns_log warning "lc_time_local_to_utc: Timezone adjustment in ad_localization.tcl found no conversion to local time for $time_value $tz"
    }

    return $utc_time
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-lang/tcl/localization-procs.xql

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