Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-05-13 17:32:43
- azw
- Member
- Registered: 2007-01-29
- Posts: 279
Timestamp for files not working as expected
I’m creating a TXP website that is primarily pdf files. I’ll be organizing the files by date and category. The dates will all be in the 1940s, meaning that the creation dates should not be today, but a day in the past century, like December 12, 1941.
I can change the creation date in PhpMyadmin to 1940, but in TXP’s file tab I can’t. Why is that? Is there a way to work around this?
Also, in the files tab, if I edit a file’s data, there is a field for create date, but it seems to always show the current time, not the data stored in the database. This seemingly makes it impossible to view the currrent dates without going into PhpMyAdmin. Isn’t there an easier way to review and edit this data?
(If there’s an easier way to deal with these PDFs I’d love to know. There will be hundreds of PDFs, so it’d be great to have a way to add them to TXP in bulk.)
Last edited by azw (2008-05-13 17:33:29)
Offline
Re: Timestamp for files not working as expected
I think it’s because TXP uses UNIX timestamps, so you can’t go back to dates before january 1th, 1970.
Offline
#3 2008-05-13 18:04:10
- azw
- Member
- Registered: 2007-01-29
- Posts: 279
Re: Timestamp for files not working as expected
Thanks for replying, Ruud.
I can change the date in PhpMyAdmin and it sticks. Maybe that’s because it’s not under the same restrictions?
Also, I can change the dates in TXP for articles, and then see the new date in the edit window, but with files the edit window displays the current date (now) rather than the stored date. Is there a way to fix that?
Last edited by azw (2008-05-13 18:08:20)
Offline
#4 2008-05-13 18:12:17
- azw
- Member
- Registered: 2007-01-29
- Posts: 279
Re: Timestamp for files not working as expected
I see now that PHP and mySQL have different slightly different date handling. But the main problem may be with using a Timestamp. I suppose I could edit the file to eliminate the Timestamp, but I’d rather not have to reedit this each time there’s an upgrade.
Maybe there’s a better solution.
If I could handle the files as articles I’d have more options. Then I could use the custom fields of articles so I can add dates that aren’t treated as dates. But I’d still have the problem of dealing with hundreds of files and the associated articles.
Last edited by azw (2008-05-13 18:53:17)
Offline