Grass Valley K2 TX/MAM Database Protocol Manual v.2.2 User Manual
Page 32

TX/MAM Database Protocol Manual - document version: 2.2
– Page 32
10.3 Getting the current system time and converting to a Cobalt time
field
int cob_get_current_timedate_msec( long long *time_date_msec );
Parameters
Name
Description
long long
*time_date_msec
The resulting Cobalt time field.
Result
The result of the function is an integer that can have following values:
Value
Description
0
Success, time converted
-1
Failure, the time could not be converted
Example
Setting the current system time to the start time of a main event:
cob_get_current_timedate_msec( mainevent_datetime );
cob_fieldlist_clear();
cob_fieldlist_set_long( "start_datetime", mainevent_datetime, ORIGINAL_DATA );
if ( cob_adjust_field_values("main_event", 1035) != 0 ){
/* Log error */
}