Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2026-06-12 17:56:40

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,595
Website GitHub

Re: Latest version 4.9

etc wrote #343351:

Just in case, what SELECT UNIX_TIMESTAMP(FROM_UNIXTIME(1)) returns?

I get 1 out.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#32 2026-06-12 21:51:30

etc
Developer
Registered: 2010-11-11
Posts: 5,715
Website GitHub

Re: Latest version 4.9

Anyone could send me credentials for a faulty txp site? Or, better, make a sandbox site, to debug safely.

Offline

#33 2026-06-12 22:45:58

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,595
Website GitHub

Re: Latest version 4.9

etc wrote #343354:

Anyone could send me credentials for a faulty txp site?

You have mail.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#34 2026-06-13 11:22:04

abu
Plugin Author
From: Switzerland
Registered: 2025-04-03
Posts: 20
GitHub GitLab Mastodon

Re: Latest version 4.9

I stumbled upon another issue relating to the COALESCE/FROM_UNIXTIME trickery. On updating an article, the code

$whenposted = "COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)) + INTERVAL $uPosted SECOND";

throws an error.

ERROR 1292 (22007): Truncated incorrect unixtime value: ‘0.0’

Offline

#35 2026-06-13 15:08:32

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,321
Website GitHub

Re: Latest version 4.9

Bloke wrote #343352:

I get 1 out.

I do too on the aforementioned server.


TXP Builders – finely-crafted code, design and txp

Offline

#36 Yesterday 19:21:25

etc
Developer
Registered: 2010-11-11
Posts: 5,715
Website GitHub

Re: Latest version 4.9

I thinks the best we can is to revert 4.9.2 to unix epoch (1970 – 2038) and extend it in a next version, maybe even txp 5. There is too much weirdness around.

Offline

#37 Today 08:20:00

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,595
Website GitHub

Re: Latest version 4.9

etc wrote #343360:

I thinks the best we can is to revert 4.9.2 to unix epoch (1970 – 2038) and extend it in a next version.

Boooooooooo. I really like the fact that dates can extend – almost – back as far as 0. It’s a nice product feature, especially for historical blogs.

Are we fairly certain this is a MariaDB oddity? i.e. MySQL behaves – even v8 and v9? Or does it affect both? And is it solely the changes made in 4.9.x to extend the date range that caused it? Or would it have occurred anyway because of changes made in MariaDB? Or is it a long-standing Txp bug?

At this very moment of writing, I have this situation:

  • Me at the laptop in the UK: 09:20am.
  • My Txp site on a server in Germany: 10:20am.
  • UTC: 08:20am.

As far as I see things, we have two issues:

  1. The MariaDB zero-time bug that makes things 1-second out, or throws errors if a 0-value datestamp is used.
  2. The off-by-one-hour-in-the-future issue when publishing content.

For the latter, is it only off by one hour because of the time difference between “me” and “my server”? Or “me” and “UTC”? i.e. if my server was in San Francisco, would my new article be posted 8 hours earlier than “me” time? And if it was in Singapore, my article wouldn’t show up on the site for another 6 hours?

Maybe if we can answer that, we might be able to fix the posted date by adding either the server timezone offset (which I thought we did anyway in safe_strftime()) or allowing for the UTC<->Me time difference?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB