From fc810f23de3d897a162b9ba0470364ff30591044 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Fri, 16 Aug 2019 16:00:57 +0000
Subject: [PATCH] Added MSG_IMP_DATE and MSG_IMP_TIMEZONE codes (message
 imported date/time and timezone), for Mark Lewis. The imported timezone will
 always be the local timezone (at the time of import) so not sure what value
 that has. <shrug>

---
 src/sbbs3/atcodes.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/sbbs3/atcodes.cpp b/src/sbbs3/atcodes.cpp
index 74d5a9daea..791a5d7d1d 100644
--- a/src/sbbs3/atcodes.cpp
+++ b/src/sbbs3/atcodes.cpp
@@ -1215,11 +1215,15 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode)
 		return(current_msg->tags==NULL ? nulstr : current_msg->tags);
 	if(!strcmp(sp,"MSG_DATE") && current_msg!=NULL)
 		return(timestr(current_msg->hdr.when_written.time));
+	if(!strcmp(sp,"MSG_IMP_DATE") && current_msg!=NULL)
+		return(timestr(current_msg->hdr.when_imported.time));
 	if(!strcmp(sp,"MSG_AGE") && current_msg!=NULL)
 		return age_of_posted_item(str, maxlen
 			, current_msg->hdr.when_written.time - (smb_tzutc(current_msg->hdr.when_written.zone) * 60));
 	if(!strcmp(sp,"MSG_TIMEZONE") && current_msg!=NULL)
 		return(smb_zonestr(current_msg->hdr.when_written.zone,NULL));
+	if(!strcmp(sp,"MSG_IMP_TIMEZONE") && current_msg!=NULL)
+		return(smb_zonestr(current_msg->hdr.when_imported.zone,NULL));
 	if(!strcmp(sp,"MSG_ATTR") && current_msg!=NULL) {
 		uint16_t attr = current_msg->hdr.attr;
 		uint16_t poll = attr&MSG_POLL_VOTE_MASK;
-- 
GitLab