Skip to content
Snippets Groups Projects
Commit beaf2ac2 authored by rswindell's avatar rswindell
Browse files

2 new @-codes:

* DATETIME (current system date and time and long, 24 char, format).
* TIMEZONE (current system time zone abbrev or UTC offset).
parent 6ec7013c
No related branches found
No related tags found
No related merge requests found
...@@ -238,11 +238,17 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen) ...@@ -238,11 +238,17 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen)
return(str); return(str);
} }
if(!strcmp(sp,"TIMEZONE"))
return(smb_zonestr(sys_timezone(&cfg),str));
if(!strcmp(sp,"DATE") || !strcmp(sp,"SYSDATE")) { if(!strcmp(sp,"DATE") || !strcmp(sp,"SYSDATE")) {
now=time(NULL); now=time(NULL);
return(unixtodstr(&cfg,now,str)); return(unixtodstr(&cfg,now,str));
} }
if(!strcmp(sp,"DATETIME"))
return(timestr(time(NULL)));
if(!strcmp(sp,"TMSG")) { if(!strcmp(sp,"TMSG")) {
l=0; l=0;
for(i=0;i<cfg.total_subs;i++) for(i=0;i<cfg.total_subs;i++)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment