This is a private note that has been shared.


Potential timezone bug in Threads messages?

Hi Manton,

I’ve noticed a potential issue with how timestamps are parsed for posts from Threads. It seems that the timezone handling might be incorrect, causing the same message to appear as if it was published hours apart when they were actually cross-posted to mastodon and threads at the same time.

Here’s an example JSON response from my own timeline:

[
  {
    "id": "49765086",
    "url": "https://www.threads.net/@gruber/post/DCa7tFdPg3f",
    "content_html": "<p>This was like watching the goddamn election again.</p>",
    "date_published": "2024-11-15T21:39:29+00:00",
    "_microblog": {
      "date_timestamp": 1731706769
    },
    "author": { "name": "John Gruber", "url": "https://threads.net/@gruber/" }
  },
  {
    "id": "49764611",
    "url": "https://mastodon.social/@gruber/113491022061652044",
    "content_html": "<p>This was like watching the goddamn election again.</p>",
    "date_published": "2024-11-16T05:39:26+00:00",
    "_microblog": {
      "date_timestamp": 1731735566
    },
    "author": { "name": "John Gruber", "url": "https://mastodon.social/@gruber" }
  }
]

In this case:

  • The date_published for Threads is 2024-11-15T21:39:29+00:00 and for Mastodon is 2024-11-16T05:39:26+00:00.
  • The _microblog.date_timestamp for Threads is 1731706769 and for Mastodon is 1731735566.

Both messages are identical and were sent at the same time, so these discrepancies suggest a timezone parsing issue, particularly with messages from Threads.

My guess is that the timezone parsing for messages from Threads might be inconsistent as it seems that the mastodon date is consistent with the date reported on the mastodon instance.

I hope this example is helpful for understanding the issue. Please let me know if I can provide any additional details or context.

Thank you for your time and effort!

Best regards, Johan