Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
missing 'am' 'pm' strings in locale?
Hi,
I just noticed that in the ?event=discuss page, all the times were less that 12:00… I checked the source and I saw that it is using a 12 hour clock format (which I dislike but that’s my own problem).
The point is that although it is pretty clear in the source that there should be a trailing am/pm string attached to the time, I don’t see it.
I went to the language administration page (?event=prefs&step=list_languages), and set the active language to English (it was set in Spanish), and voilá, the AM/PM indicators appeared.
I read http://www.php.net/manual/en/function.strftime.php and it says:
%p – either `am’ or `pm’ according to the given time value, or the corresponding strings for the current locale
so I think that whatever the ‘current locale’ is set for Spanish, it doesn’t have these strings set at all…
Is this a Textpattern problem? A PHP problem? or an OS problem?
FWIW, I’m running apache 2 under fedora… but I don’t have access to much of it since it is a chrooted virtual server (I do have access to php.ini and to .htaccess files, though).
I don’t even know if I should post here, in troubleshooting or in ‘how do I’ section… if misposted, please redirect me.
TIA
Mariano Absatz – El Baby
I don’t suffer from insanity. I enjoy every minute of it.
Offline
#2 2006-05-20 00:28:07
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: missing 'am' 'pm' strings in locale?
PHP (perhaps in conjunction with your OS). Apparently the Spanish locale doesn’t include that info. :/
You don’t have to use 12 hour clock though.
Offline
Re: missing 'am' 'pm' strings in locale?
Mary wrote:
You don’t have to use 12 hour clock though.
Mmmmhhh, however, at least in the <code>?event=discuss</code> page, this seems to be hardwired in the source… I manually patched this, but I don’t see a configurable way of doing it…
<pre><code>
<pre><code>
Index: textpattern/include/txp_discuss.php
===================================================================
--- textpattern/include/txp_discuss.php (revision 1313)
+++ textpattern/include/txp_discuss.php (working copy)
@@ -96,7 +96,7 @@
- $date = "".safe_strftime('%b %e %I:%M %p',$uPosted)."";
+ $date = "".safe_strftime('%b %e %H:%M',$uPosted)."";
</code></pre>
</code></pre>
Mariano Absatz – El Baby
I don’t suffer from insanity. I enjoy every minute of it.
Offline
#4 2006-05-20 01:49:23
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: missing 'am' 'pm' strings in locale?
Oh, duh, I missed that you were talking about the admin date. :D
Offline
Pages: 1