Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-12-01 18:15:16

magrio
Member
From: México
Registered: 2008-07-19
Posts: 12
Website

Very very old publish dates

Hi!

I am developing a biographical site, so I need very very old publication dates, however I see that txp uses the strtotime function to make their calculations (I’m not advanced in php), so I can’t use older dates than 1 January 1970, and I need to use dates from 1870 in order to show articles in chronological order.

There are way to do this?

Offline

#2 2009-12-01 19:30:47

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Very very old publish dates

magrio wrote:

I am developing a biographical site, so I need very very old publication dates, however I see that txp uses the strtotime function to make their calculations (I’m not advanced in php), so I can’t use older dates than 1 January 1970, and I need to use dates from 1870 in order to show articles in chronological order.

No, you can not use dates prior to unix epoch.

There are way to do this?

If you want to use dates prior 1970 and sort articles by that date, you can use custom fields. You can put timestamps (1880-09-21 and such) in a custom field and use the custom field as your sort criteria.

Just remember that if you happen to use OS that is limited by unix epoch, you can not use strftime and such unix date functions to format your timestamp as is, ie. you need to cut the year off, use a other function or present the date as it is.

Last edited by Gocom (2009-12-01 19:36:19)

Offline

#3 2009-12-01 19:48:32

magrio
Member
From: México
Registered: 2008-07-19
Posts: 12
Website

Re: Very very old publish dates

Oh wow…

I feared it was that…
I dont want use custom fields in order to make things easier to customer, but it seems like no option.

Thank you so much!

Offline

Board footer

Powered by FluxBB