Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-10-26 08:34:28
- M_i
- Member
- Registered: 2006-03-05
- Posts: 122
Timestamps not being displayed correctly in backend (AM/PM missing)
Hello,
The Textpattern installations that I’ve upgraded to 4.0.4 are showing incorrect timestamps in the admin area. On the article, image, link, comment and log pages, times are quoted in a 12 hour clock (which I don’t much care for, I’d much rather have a 24 hour, but that aside), but with the AM/PM bit missing.
Demonstration:
It now looks as if comments 29-32 were made very early in the morning. They weren’t. They were made between 16:34 and 17:11, or 4:34 PM and 5:11 PM, if you will. It also looks as if there was almost 22 hours between comment 34 and 35, which there wasn’t: comment 34 was made shortly before midnight, and comment 35 the next morning. The front end does show all times correctly.
It’s most likely something server related because this problem shows up on the four installations I have with one host, but not one I have elsewhere, or on any of my local installations.
Any suggestions would be most gratefully received.
Offline
#2 2006-10-26 08:46:46
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Timestamps not being displayed correctly in backend (AM/PM missing)
Would you post your diagnostics please?
Offline
#3 2006-10-26 08:53:09
- M_i
- Member
- Registered: 2006-03-05
- Posts: 122
Re: Timestamps not being displayed correctly in backend (AM/PM missing)
Here you go, and thanks for looking into it:
Textpattern version: 4.0.4 (r1956)
Last Update: 2006-10-18 10:00:11/2006-10-18 09:59:00
Document root: /home/*** (/home/.kendra/***)
$path_to_site: /home/.kendra/***
Textpattern path: /home/.kendra/***/textpattern
Permanent link mode: section_title
Temporary directory path: /home/.kendra/***/textpattern/tmp
Site URL: www.***.com
PHP version: 4.4.2
Register globals: 1
Server Local Time: 2006-10-26 01:47:43
MySQL: 5.0.24a-standard-log
Locale: en_GB.UTF-8
Server: Apache/2.0.54 (Unix) PHP/4.4.2 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.1.4
PHP Server API: cgi
RFC 2616 headers:
Server OS: Linux 2.4.32-grsec+f6b+gr217+nfs+a32+fuse23+tg+++opt+c8+gr2b-v6.194
Active plugins: ajw_clean_feed-0.2, rss_article_edit-0.1, zem_contact_reborn-4.0.3.17, zem_contact_lang-4.0.3.03m, rss_admin_db_manager-4.1
Pre-flight check:
————————————
/home/.kendra/***/textpattern/setup/ still exists
————————————
.htaccess file contents:
————————————
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#RewriteBase /relative/web/path/
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]
RewriteRule ^(.*) index.php </IfModule>#php_value register_globals 0
————————————
Offline
#4 2006-10-26 20:33:43
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Timestamps not being displayed correctly in backend (AM/PM missing)
Here’s the date/time format used for dates in the admin article list: %d %b %Y %I:%M %p.
Note the %p – that’s am or pm according to the current locale.
Your system’s locale data is incorrect.
Alex
Offline
#5 2006-10-26 21:13:34
- M_i
- Member
- Registered: 2006-03-05
- Posts: 122
Re: Timestamps not being displayed correctly in backend (AM/PM missing)
zem wrote:
Your system’s locale data is incorrect.
So what do I do about that? What do I ask my host?
Or else: might I just as well change the date/time format that is used admin side to %d %b %Y %H:%M (which I much prefer anyway).
I’ve just tried this for one of the pages and it seems to be working fine… or is that reasoning far too simple and did I just break something crucial?
Last edited by M_i (2006-10-26 21:15:35)
Offline
#6 2006-10-27 02:27:56
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Timestamps not being displayed correctly in backend (AM/PM missing)
So what do I do about that? What do I ask my host?
Tell them that your server’s locale “en_GB.UTF-8” appears to have something wrong with it, that when you do strftime('%d %b %Y %I:%M %p'); in PHP, the am/pm bit does not show up. Then it’s up to them, really.
…or is that reasoning far too simple and did I just break something crucial?
No, that should work fine.
Offline
#7 2006-10-27 07:38:26
- M_i
- Member
- Registered: 2006-03-05
- Posts: 122
Re: Timestamps not being displayed correctly in backend (AM/PM missing)
Mary wrote:
No, that should work fine.
Excellent! Will do that then. (And complain to the host.. can’t have them slacking…)
Mary, zem – thank you so much, you’re the best!
Offline
Re: Timestamps not being displayed correctly in backend (AM/PM missing)
Just checked on my debian install, and it seems I have that part missing as well, so it may not be your hosts fault.
For the next Textpattern version I switched to:
strftime('%d %b %Y %X');
for all admin-side pages, which should use the preferred time-format of the respective locale. That should work better across the board.
Offline
#9 2006-10-27 13:55:13
- M_i
- Member
- Registered: 2006-03-05
- Posts: 122
Re: Timestamps not being displayed correctly in backend (AM/PM missing)
Sencer wrote:
Just checked on my debian install, and it seems I have that part missing as well, so it may not be your hosts fault.
Yes, I also expect it’s sometime with Debian. Just the British locales though: I just changed my locale for one of my sites to en_US.UFT-8 and that cleared it right up, while en_GB.ISO-8859-1 showed the same behaviour as en_GB.UFT-8.
Sencer wrote:
For the next Textpattern version I switched to:
strftime('%d %b %Y %X');
for all admin-side pages, which should use the preferred time-format of the respective locale. That should work better across the board.
That’d be marvelous.
Thanks for helping out!
Offline