Displaying 1 result from an estimated 1 matches for "workspacelen".
2003 Apr 20
4
${EPOCH} and ${DATETIME} patch
...ond;
char tmpvar[80] = "";
+ time_t thistime;
+ struct tm brokentime;
int offset,offset2;
struct ast_var_t *variables;
char *name, *num; /* for callerid name + num variables */
@@ -807,6 +809,21 @@
} else if (!strcmp(var, "CHANNEL")) {
strncpy(workspace, c->name, workspacelen - 1);
*ret = workspace;
+ } else if (!strcmp(var, "EPOCH")) {
+ snprintf(workspace, workspacelen -1, "%u",(int)time(NULL));
+ *ret = workspace;
+ } else if (!strcmp(var, "DATETIME")) {
+ thistime=time(NULL);
+ localtime_r(&thistime, &brokentime);
+...