• Latest message timestamps

    From Nightfox@VERT/DIGDIST to All on Tue Dec 8 00:29:42 2009
    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?

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS: digdist.bbsindex.com
  • From Digital Man@VERT to Nightfox on Tue Dec 8 05:57:51 2009
    Re: Latest message timestamps
    By: Nightfox to All on Mon Dec 07 2009 04:29 pm

    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?

    Use the "when_imported_time" of the last message in the sub-board. That should always be the newest date/time.

    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?

    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. The "when_written_time" is stored in UTC, but represents the local time in the time zone where the message was written (not necessarily the local time zone).

    digital man

    Snapple "Real Fact" #180:
    The first VCR was made in 1956 and was the size of a piano.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Tue Dec 8 06:19:56 2009
    Re: Latest message timestamps
    By: Digital Man to Nightfox on Mon Dec 07 2009 21:57:51

    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).

    Thanks.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS: digdist.bbsindex.com
  • From Tracker1@VERT/TRN to Nightfox on Sat Dec 12 04:11:24 2009
    On 12/7/2009 5:29 PM, Nightfox wrote:
    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?

    Yeah, the date-time for networked messages will be in local time from where they are posted, with no reliable internationalization. Your best bet is to check the filesystem date/time for the board in question. You can then simply show a "Last Update/Post: yyyy-MM-dd HH:mm" based on the FS's date time.

    --
    Michael J. Ryan - http://tracker1.info/

    ---
    þ Synchronet þ Roughneck BBS - telnet://roughneckbbs.com - www.roughneckbbs.com
  • From Nightfox@VERT/DIGDIST to Tracker1 on Sat Dec 12 08:01:43 2009
    Re: Re: Latest message timestamps
    By: Tracker1 to Nightfox on Fri Dec 11 2009 20:11:24

    Yeah, the date-time for networked messages will be in local time from whe they are posted, with no reliable internationalization. Your best bet is check the filesystem date/time for the board in question. You can then s show a "Last Update/Post: yyyy-MM-dd HH:mm" based on the FS's date time.

    That would probably work.. Per the suggestion from Digital Man, I used the when_imported_time property of the message header, which seems to work reasonably well.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS: digdist.bbsindex.com