@@ -690,6 +690,9 @@ static inline int mi_print_shtable_record(struct mi_node *rpl, subs_t* s)
690
690
{
691
691
struct mi_node * node , * node1 ;
692
692
struct mi_attr * attr ;
693
+ time_t _ts ;
694
+ char date_buf [MI_DATE_BUF_LEN ];
695
+ int date_buf_len ;
693
696
char * p ;
694
697
int len ;
695
698
@@ -701,11 +704,16 @@ static inline int mi_print_shtable_record(struct mi_node *rpl, subs_t* s)
701
704
attr = add_mi_attr(node, MI_DUP_VALUE, "event_id", 8, s->event_id.s, s->event_id.len);
702
705
if (attr==NULL) goto error;
703
706
*/
704
- p = int2str ((unsigned long )s -> status , & len );
705
- attr = add_mi_attr (node , MI_DUP_VALUE , "status" , 6 , p , len );
706
707
if (attr == NULL ) goto error ;
707
- p = int2str ((unsigned long )s -> expires , & len );
708
- attr = add_mi_attr (node , MI_DUP_VALUE , "expires" , 7 , p , len );
708
+ _ts = (time_t )s -> expires ;
709
+ date_buf_len = strftime (date_buf , MI_DATE_BUF_LEN - 1 ,
710
+ "%Y-%m-%d %H:%M:%S" , localtime (& _ts ));
711
+ if (date_buf_len != 0 ) {
712
+ attr = add_mi_attr (node , MI_DUP_VALUE , "expires" , 7 , date_buf , date_buf_len );
713
+ } else {
714
+ p = int2str ((unsigned long )s -> expires , & len );
715
+ attr = add_mi_attr (node , MI_DUP_VALUE , "expires" , 7 , p , len );
716
+ }
709
717
if (attr == NULL ) goto error ;
710
718
p = int2str ((unsigned long )s -> db_flag , & len );
711
719
attr = add_mi_attr (node , MI_DUP_VALUE , "db_flag" , 7 , p , len );
0 commit comments