Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2026-07-14 13:57:18

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

Re: [solved] Date posted puzzlement

Another massive 4.9.2 rewrite, please test.

Offline

#17 2026-07-14 17:31:19

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

Re: [solved] Date posted puzzlement

Wow, that’s a huge alteration, but fabulous it’s now compartmentalised. Should.make it far easier to make changes if there’s any tweaks needed. Nice work.

Is there any mileage in making our own DateTime (for example) class that encapsulates the new functions and safe_strftime(), etc? Or is it better to keep it as a function for speed?


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

#18 Yesterday 11:43:35

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

Re: [solved] Date posted puzzlement

Bloke wrote #343496:

Is there any mileage in making our own DateTime (for example) class that encapsulates the new functions and safe_strftime(), etc? Or is it better to keep it as a function for speed?

I do not think this would make a big difference. One of the advantages of the classes is loading on demand, thus sparing some memory when a class is not required (we do it for some less-used tags). But date/time functions are used on almost all pages, so we would not improve anything performance-wise by implementing a new class.

The main question atm is whether everything date-related works ok now, in each db version.

Offline

#19 Today 06:09:30

phiw13
Plugin Author
From: East Asia
Registered: 2004-02-27
Posts: 3,710
Website

Re: [solved] Date posted puzzlement

etc wrote #343499:

The main question atm is whether everything date-related works ok now, in each db version.

So far I didn’t have any issue (date & time set as expected when authoring (creating and editing) an article, when checking past articles (admin side and public side). Idem for Images.

Tested

  • locally, PHP 8.5.x, MySQL 8.4.x
  • Singapore based server: PHP 8.5.x, MySQL: 8.4.10-10 (Percona Server (GPL), Release 10, Revision d76e81f4)

There is one hour timezone difference between me and the Singapore server.


In low-power mode.
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

Board footer

Powered by FluxBB