case 'j': /* day of the month, numeric, no leading zeros */
case 'H': /* hour, numeric, 24 hour format */
case 'h': /* hour, numeric, 12 hour format */
+ case 'G': /* hour, numeric, 24 hour format, no leading zeroes */
+ case 'g': /* hour, numeric, 12 hour format, no leading zeroes */
case 'i': /* minutes, numeric */
case 's': /* seconds, numeric */
case 'A': /* AM/PM */
sprintf(tmp_buff, "%02d", h); /* SAFE */
strcat(return_value->value.str.val, tmp_buff);
break;
+ case 'G': /* hour, numeric, 24 hour format, no leading zeros */
+ sprintf(tmp_buff, "%d", ta->tm_hour); /* SAFE */
+ strcat(return_value->value.str.val, tmp_buff);
+ break;
+ case 'g': /* hour, numeric, 12 hour format, no leading zeros */
+ h = ta->tm_hour % 12; if (h==0) h = 12;
+ sprintf(tmp_buff, "%d", h); /* SAFE */
+ strcat(return_value->value.str.val, tmp_buff);
+ break;
case 'i': /* minutes, numeric */
sprintf(tmp_buff, "%02d", ta->tm_min); /* SAFE */
strcat(return_value->value.str.val, tmp_buff);