Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2015-04-16 18:51:23

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Posted Dates Older than 1970

Any Ideas on how I could accomplish this? I have a timeline to display that has ye olde dates.

Offline

#2 2015-04-16 19:26:33

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

Re: Posted Dates Older than 1970

I think you’ll struggle with dates outside the 1970-2038 window, due to the way PHP handles dates. Use a custom field instead?

Edit: also, take a look at adodb – might be helpful.

Edit 2: Jukka’s take on pre-1970 dates: forum.textpattern.com/viewtopic.php?pid=220538#p220538

Edit 3: once again, etc has a much smarter answer than I do – see below

Last edited by gaekwad (2015-04-17 09:06:31)

Offline

#3 2015-04-16 19:41:59

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

Re: Posted Dates Older than 1970

PHP 5.2 and above accepts negative timestamps in time functions, extending dates range to 1901—2038. Probably, txp article_save() function needs some lift-up.

Offline

#4 2015-04-16 22:38:22

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Posted Dates Older than 1970

Thanks all… looks like it’s custom_fields land for me.

Offline

Board footer

Powered by FluxBB