Hi all -
I've been updating the command shell on my BBS (written in JavaScript) so that in the message sub-board listings (i.e., when the user wants to jump
to a new sub-board), it will display the date & time of the newest message along with the sub-board name and number of messages for each sub-board. However, I've noticed something that may complicate that a bit - The last message posted in a sub-board might not necessarily be the newest message, according to its timestamp. In QWK-networked sub-boards, I'd guess that this may be due to a delayed posting or because of QWK accounts being in different time zones.
In my command shell, I could get the dates & times for all the messages in
a sub-board, sort them, and choose the latest date & time that way, but
that can be slow. Alternatively, I can simply get the date & time of the last message posted in the sub-board. Is there a better way to get the latest date & time of a message that is still fast?
As far as the message timestamps, is it true that all messages (even in QWK-networked sub-boards) have a timestamp in the local time zone of the originating BBS?
Use the "when_imported_time" of the last message in the sub-board. That s always be the newest date/time.
The times are stored in UTC. If you wish to know the time zone of when a message was written, check the "when_written_zone" header property value. "when_written_time" is stored in UTC, but represents the local time in th zone where the message was written (not necessarily the local time zone).
Sysop: | MCMLXXIX |
---|---|
Location: | Prospect, CT |
Users: | 325 |
Nodes: | 10 (0 / 10) |
Uptime: | 239:49:19 |
Calls: | 508 |
Messages: | 219892 |