xo::ical proc date_time_to_clock (public)
xo::ical date_time_to_clock date time utc
Defined in packages/xotcl-core/tcl/01-debug-procs.tcl
Convert separate fields date and time with boolean utc flags into clock value in seconds.
- Parameters:
- date (required)
- time (required)
- utc (required)
- Testcases:
- No testcase defined.
Source code: # # Convert separate fields date and time with boolean utc flags # into clock value in seconds. # set year [string range $date 0 3] set month [string range $date 4 5] set day [string range $date 6 7] set hour [string range $time 0 1] set min [string range $time 2 3] set sec [string range $time 4 5] set TZ [expr {$utc ? "GMT" : ""}] return [clock scan "$year-$month-$day $hour:$min $TZ"]XQL Not present: Generic, PostgreSQL, Oracle