Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
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
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
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
Pages: 1