• MPL DateStr and User Data

    From Gryphon@21:1/101 to All on Fri May 9 09:03:01 2025
    I'm having a issue with a userlist MPL that is supposed to read the user list and display the information. I am using datestr to format the UserFirstOn and UserLastOn date/time variables. But the output is completely wrong.

    For instance, a user had first logged in on 06/23/24 (in MM/DD/YY format) but my mpl that displays datestr(userfirston,1) will display it as 03/24/31. This only seems to happen when reading the user list with getuser(num) and using userfirston. When I iterate through the user list, the userfirston dates seem to had consistent values for that login. i.e., the next user first login was 3 days later (06/26/24) and the date value displayed as 03/30/31.

    This is the only area I've found that will give the weird date output. When I use datestr(datetime) it displays the proper date.

    Does this happen with anybody else? This is on the linux x86_64 version of A49.

    "Amy Pond, there's something you better understand about me 'cause it's
    important, and one day your life may depend upon it. I am definitely a Mad
    Man with a Blue Box."
    .oO Madman with a Blue Box BBS Oo.oO madmanbbs.ddns.net Oo.

    ... I don't want to go!

    --- Mystic BBS v1.12 A48 (Linux/64)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (21:1/101)
  • From maskreet@21:1/114 to Gryphon on Thu May 8 19:29:46 2025
    On 09 May 2025, Gryphon said the following...

    I'm having a issue with a userlist MPL that is supposed to read the user list and display the information. I am using datestr to format the UserFirstOn and UserLastOn date/time variables. But the output is completely wrong.

    There's something I experienced with a Python script and formatting a last call list for DoorParty. I don't remember exactly what it was, I'd have to look, but it was something with Mystic's date format being incorrectly interpreted by Python, and it being a DOS-packed 32bit datetime format that screwed me up. It might be something similar in nature to what you're experiencing, because what got me about your post was I was also getting future dates in the 2030s and it should have been correct. I had to ask ChatGPT to help me with that one.

    You'd think though that it would format correctly with MPL and all, but maybe it's a bit of oversight on g00's part.

    --- Mystic BBS v1.12 A49 2024/05/12 (Linux/64)
    * Origin: throwbackbbs.com -\- meriden, ct -\- (21:1/114)
  • From opicron@21:3/126 to Gryphon on Fri May 9 10:15:35 2025
    Does this happen with anybody else? This is on the linux x86_64 version of

    I believe there has been a change in datetime between a47/a49. In my mods I do a check of version and either use dateu2d or dated2u.

    oP!

    ... We are all driven into the same fold. Horace (8 BC)

    --- Mystic BBS v1.12 A49 2024/05/29 (Linux/64)
    * Origin: TheForze - bbs.theforze.eu:23 (21:3/126)
  • From Gryphon@21:1/101 to maskreet on Fri May 9 23:53:40 2025
    On 08 May 2025 at 07:29p, maskreet pondered and said...

    On 09 May 2025, Gryphon said the following...

    I'm having a issue with a userlist MPL that is supposed to read the u list and display the information. I am using datestr to format the UserFirstOn and UserLastOn date/time variables. But the output is completely wrong.

    There's something I experienced with a Python script and formatting a
    last call list for DoorParty. I don't remember exactly what it was, I'd have to look, but it was something with Mystic's date format being incorrectly interpreted by Python, and it being a DOS-packed 32bit datetime format that screwed me up. It might be something similar in nature to what you're experiencing, because what got me about your post was I was also getting future dates in the 2030s and it should have been correct. I had to ask ChatGPT to help me with that one.

    You'd think though that it would format correctly with MPL and all, but maybe it's a bit of oversight on g00's part.

    Yeah this is what I was thinking too. I tried the datestrjulian and the datej2g and nothing worked. I even tried to use mci2str('FO') and it only showed my first login.

    "Amy Pond, there's something you better understand about me 'cause it's
    important, and one day your life may depend upon it. I am definitely a Mad
    Man with a Blue Box."
    .oO Madman with a Blue Box BBS Oo.oO madmanbbs.ddns.net Oo.

    ... I don't want to go!

    --- Mystic BBS v1.12 A48 (Linux/64)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (21:1/101)
  • From Gryphon@21:1/101 to opicron on Fri May 9 23:57:24 2025
    On 09 May 2025 at 10:15a, opicron pondered and said...

    Does this happen with anybody else? This is on the linux x86_64 versi

    I believe there has been a change in datetime between a47/a49. In my
    mods I do a check of version and either use dateu2d or dated2u.

    I was unaware of the u2d or the d2u. I'll give them a try.

    I learn alot about what is available in mplc by doing 'strings mplc' and then greping for xyz. I found these date related functions:
    datetime
    datejulian
    datestr
    datestrjulian
    date2dos
    date2julian
    dateg2j
    datej2g
    datevalid
    formatdate
    dateunix
    dateu2d
    dated2u
    userdatetype

    I see now the dateu2d functions. I'll have to experiment.

    "Amy Pond, there's something you better understand about me 'cause it's
    important, and one day your life may depend upon it. I am definitely a Mad
    Man with a Blue Box."
    .oO Madman with a Blue Box BBS Oo.oO madmanbbs.ddns.net Oo.

    ... I don't want to go!

    --- Mystic BBS v1.12 A48 (Linux/64)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (21:1/101)
  • From opicron@21:3/126 to Gryphon on Fri May 9 18:06:27 2025
    Does this happen with anybody else? This is on the linux x86_64
    I believe there has been a change in datetime between a47/a49. In my mods I do a check of version and either use dateu2d or dated2u.
    I was unaware of the u2d or the d2u. I'll give them a try.

    Here is my code from Python 2.7

    --snip--

    if min_mystic_version(12,49):
    return dateu2d(ls[2])

    if min_mystic_version(12,47):
    return ls[2]
    --snip--

    oP!

    ... Notice how easily it detaches. ■ Ro

    --- Mystic BBS v1.12 A49 2024/05/29 (Linux/64)
    * Origin: TheForze - bbs.theforze.eu:23 (21:3/126)