Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2026-01-12 14:21:55

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

Re: Latest version 4.9

Bloke wrote #342028:

Oleg: should we alter the txp_lang.lastmod column to be DATETIME instead of TIMESTAMP?

Would this be easily portable between different time zones? Needs some thinking.

Even though we don’t store lang strings with dates < UNIX Epoch, it means we could potentially alter FROM_UNIXTIME(0) to something else throughout the code without worrying if it’ll produce a timestamp we can’t store.

This change in MariaDB is rather weird: FROM_UNIXTIME(0) now returns NULL, but FROM_UNIXTIME(1) gives the UNIX 0 timestamp as local date, like 1970-01-01 01:00:00. We could switch to FROM_UNIXTIME(1) awaiting a better solution, eventually adjusting by 1 second.

Offline

#17 2026-01-12 14:39:05

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,876
GitHub

Re: Latest version 4.9

I’ll make sure the next demo site server build includes MariaDB.

Offline

#18 2026-01-13 20:28:20

swain
New Member
From: Cardigan
Registered: 2015-07-21
Posts: 10
Website

Re: Latest version 4.9

Congratulations on the release of 4.9.0.

Hope for the future.

Offline

#19 2026-03-14 18:58:14

colin99
Member
Registered: 2005-11-15
Posts: 83

Re: Latest version 4.9

Adams wrote #342025:

Hi, finally I found it the issue in sql statement where says
FROM_UNIXTIME(0)
this function no longer valid with MySQL: 11.8.5-MariaDB
so I replaced all FROM_UNIXTIME(0) with FROM_UNIXTIME(UNIX_TIMESTAMP())
and all articles shows now as expected on all pages.
I’m sure you guys make this backward compatible and some kind checking mysql version.
So far that was the main issue I found, may be more invisible issues out there.

OK — so my 4.91 update results in only 1 article displaying on my homepage…
and no <older> links shown…

AND

No new articles published are visible.

The SQL change you make above — where is that change made and how do you do it please?
I know my way around PhpMyAdmin…


On the World Wide Web since Day 1 – Editor/Creator – Coffeecrew.com -

Offline

#20 2026-03-14 20:30:37

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

Re: Latest version 4.9

Hi Colin,

Oleg has, I believe, already patched that in this changeset, which should already be in txp 4.9.1 (the changes are made to the code rather than in phpMyAdmin). If you’ve already updated, maybe your problems lies somewhere else? Would you be able to share your (anonymized) diagnostics?


TXP Builders – finely-crafted code, design and txp

Offline

#21 2026-03-14 22:22:00

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

Re: Latest version 4.9

Colin seems to use 10.6.25-MariaDB, which should not be concerned by this patch. And, afaik, nobody yet has confirmed that the patch is working (or otherwise).

Offline

#22 2026-03-19 22:35:03

colin99
Member
Registered: 2005-11-15
Posts: 83

Re: Latest version 4.9

etc wrote #342944:

Colin seems to use 10.6.25-MariaDB, which should not be concerned by this patch. And, afaik, nobody yet has confirmed that the patch is working (or otherwise).

One oddity that I would like to report…

When I am writing a post, the timestamp is ONE hour ahead — regardless of where I set time zone or daylight savings time…

I mean – it is easy to reset the time… but if I post w/o thinking, it will one hour before I see my post! :-)

Maybe that is a good thing!


On the World Wide Web since Day 1 – Editor/Creator – Coffeecrew.com -

Offline

#23 2026-03-20 16:08:34

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,314
Website Mastodon

Re: Latest version 4.9

colin99 wrote #342975:


When I am writing a post, the timestamp is ONE hour ahead — regardless of where I set time zone or daylight savings time…

… is it possible that thou are over caffeinated?


…. texted postive

Offline

#24 2026-03-21 10:14:20

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

Re: Latest version 4.9

colin99 wrote #342975:

When I am writing a post, the timestamp is ONE hour ahead — regardless of where I set time zone or daylight savings time…

It looks like unix timestamps differ by 1 hour on your php and db servers (which is weird per se), but txp should handle this. Can you paste this in the body of a new article, preview it, with tags enabled, and report back please?

<txp:php>
echo getThing('SELECT TIMESTAMPDIFF(SECOND, COALESCE(FROM_UNIXTIME(0), FROM_UNIXTIME(1)), NOW()) - UNIX_TIMESTAMP(NOW())');
</txp:php>

If it returns 0, one of the possible causes will be eliminated.

Offline

#25 2026-04-27 15:41:09

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,876
GitHub

Re: Latest version 4.9

etc wrote #342981:

It looks like unix timestamps differ by 1 hour on your php and db servers (which is weird per se), but txp should handle this. Can you paste this in the body of a new article, preview it, with tags enabled, and report back please?

I’ve just encountered this on a live site – Textpattern 4.9.1 with a remote MariaDB server.

I get 3600 when I run the code above.

Textpattern version: 4.9.1 (0d15a564a91a2e46a7a6434f0130055194073a1f8fcd8ae1)
Last update: 2026-04-27 15:38:39/2026-04-27 15:35:03
Textpattern path: __TXP-ROOT/textpattern
Article URL pattern: title_only
Production status: live
Temporary directory path: /tmp
PHP version: 8.5.5
GD Graphics Library: bundled (2.1.0 compatible); Supported formats: GIF, JPEG, PNG, WebP, AVIF.
Server time zone: Europe/Berlin
Server local time: 2026-04-27 17:40:18
Daylight Saving Time enabled?: 0
Automatically adjust Daylight Saving Time setting?: 0
Time zone (GMT offset in seconds): Europe/Berlin (0)
MySQL: 10.11.14-MariaDB-0+deb12u2 (Debian 12) 
Database server time: 2026-04-27 17:40:18
Database server time offset: 3600 s
Database server time zone: SYSTEM
Database session time zone: SYSTEM
Locale: en_GB.UTF-8
Site / Admin language: en-gb / en-gb
Web server: Apache
PHP server API: fpm-fcgi
PHP SSL version: OpenSSL 3.0.19 27 Jan 2026
RFC 2616 headers: 0
Server OS: Linux 6.1.0-44-amd64
Admin-side theme: hive 4.9.1

Offline

#26 2026-05-07 16:09:59

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

Re: Latest version 4.9

etc wrote #342981:

Can you paste this in the body of a new article, preview it, with tags enabled, and report back please?

I get 3600 too. New articles don’t show up if timestamp is set to now, but if I alter the article timestamp to an hour before now, it shows up.

Textpattern version: 4.9.2-dev (bf4c115ea9ed0a201c4a681e712fbf0d0962eced23787a5e)
Last update: 2026-03-01 22:52:24/2026-03-01 22:51:57
Textpattern path: __TXP-ROOT/textpattern
Article URL pattern: section_title
Production status: debug
Temporary directory path: /path/to/.tmp
PHP version: 8.3.30
GD Graphics Library: bundled (2.1.0 compatible); Supported formats: GIF, JPEG, PNG, WebP, AVIF.
Server time zone: UTC
Server local time: 2026-05-07 16:08:17
Daylight Saving Time enabled?: 0
Automatically adjust Daylight Saving Time setting?: 0
Time zone (GMT offset in seconds): UTC (+0)
MySQL: 10.11.14-MariaDB-0+deb12u2 (Debian 12) 
Database server time: 2026-05-07 18:08:17
Database server time offset: 3601 s
Database server time zone: SYSTEM
Database session time zone: SYSTEM
Locale: en_US.UTF-8
Site / Admin language: en / en
Web server: Apache
PHP server API: fpm-fcgi
PHP SSL version: OpenSSL 3.0.19 27 Jan 2026
RFC 2616 headers: 0
Server OS: Linux 6.1.0-45-amd64

Note that server local time (Germany) is 16:08 but the actual time according to my locale right this moment (UK) is 17:08 (an hour ahead of server local time). And the database server time is 18:08 (2hrs ahead of server local time) with 1hr+1s time offset. Curious…


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

Online

#27 Today 09:13:26

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

Re: Latest version 4.9

I’m seeing this posting one hour ahead too now on a recent site. It’s running MariaDB 10.11.18 (and I can’t change it).

The above code snippet returns 3600 regardless of what timezone is set or whether daylight saving time is enabled.

Textpattern version: 4.9.2-dev (390416b23d930762c4e0edb2d6ecf7d7e1c38b516ef85eb6)
Last update: 2026-03-06 11:32:07/2026-04-28 21:42:28
Textpattern path: __TXP-ROOT/textpattern
Article URL pattern: section_title
Production status: live
Temporary directory path: __TXP-ROOT/textpattern/tmp
PHP version: 8.5.3
GD Graphics Library: 2.3.3; Supported formats: GIF, JPEG, PNG, WebP, AVIF.
Server time zone: Europe/Berlin
Server local time: 2026-06-12 11:06:05
Daylight Saving Time enabled?: 0
Automatically adjust Daylight Saving Time setting?: 0
Time zone (GMT offset in seconds): Europe/Berlin (3600)
MySQL: 10.11.18-MariaDB-log (MariaDB Server) 
Database server time: 2026-06-12 11:06:05
Database server time offset: 3600 s
Database server time zone: SYSTEM
Database session time zone: SYSTEM
Locale: de_DE.UTF-8
Site / Admin language: de / de
Web server: Apache
PHP server API: cgi-fcgi
PHP SSL version: OpenSSL 3.0.18 30 Sep 2025
RFC 2616 headers: 0
Server OS: Linux 6.18.22-i1-ampere

The server and database time is correct to my current location, but the article posting time is an hour ahead. Changing Daylight Saving Time has no effect on the diagnostics times.

Setting the timezone in the settings to London shows the following in diagnostics:

Server time zone: Europe/London
Server local time: 2026-06-12 10:08:51
Daylight Saving Time enabled?: 0
Automatically adjust Daylight Saving Time setting?: 0
Time zone (GMT offset in seconds): Europe/London (3600)
MySQL: 10.11.18-MariaDB-log (MariaDB Server) 
Database server time: 2026-06-12 11:08:51
Database server time offset: 3600 s
Database server time zone: SYSTEM
Database session time zone: SYSTEM
Locale: de_DE.UTF-8
Site / Admin language: de / de

The database time corresponds to my actual time, the server time is reported as an hour earlier than my current time. Posting time or “Reset to now” posts to an hour ahead of London time – but is now correct for Germany. However that also affects how smd_query works, so my post still does not show online.

The only solution I have for the moment is to manually set the time back on hour in the post. Any fresh ideas?

EDIT: This commit that Oleg mentioned on the corresponding GitHub issue is already included.


TXP Builders – finely-crafted code, design and txp

Offline

#28 Today 09:30:40

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

Re: Latest version 4.9

No fresh ideas from me, but this is a sticking point for 4.9.2, imo. I’m hoping someone can scrounge up some “Aha” epiphany online, and we can find a patch. Maybe Oleg has some further thoughts?

It might stem from our (ab)use of UTC in the database but it’s odd that it only seems to affect MariaDB. Anecdotally, MariaDB seems as if it’s becoming more prevalent so this is going to need addressing somehow, especially if we’re going to give it the stamp of approval as an official alternative to MySQL in our system requirements.


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

Online

#29 Today 09:46:46

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

Re: Latest version 4.9

A further random thought: does this issue show up only in summer when DST is in effect, and disappear in winter?


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

Online

Board footer

Powered by FluxBB