Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-05-19 20:27:29

baby
Plugin Author
From: Buenos Aires, Argentina
Registered: 2005-10-16
Posts: 95
Website

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 AbsatzEl 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

#3 2006-05-20 01:40:34

baby
Plugin Author
From: Buenos Aires, Argentina
Registered: 2005-10-16
Posts: 95
Website

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&#58; textpattern&#47;include&#47;txp&#95;discuss&#46;php
&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;

&#45;&#45;&#45; textpattern&#47;include&#47;txp&#95;discuss&#46;php &#40;revision 1313&#41;
&#43;&#43;&#43; textpattern&#47;include&#47;txp&#95;discuss&#46;php &#40;working copy&#41;
&#64;&#64; &#45;96&#44;7 &#43;96&#44;7 &#64;&#64;

while &#40;&#36;a &#61; nextRow&#40;&#36;rs&#41;&#41; &#123; extract&#40;&#36;a&#41;&#59; &#36;dmessage &#61; &#40;&#36;visible &#61;&#61; SPAM&#41; &#63; short&#95;preview&#40;&#36;message&#41; &#58; &#36;message&#59;

&#45; &#36;date &#61; &#34;&#34;&#46;safe&#95;strftime&#40;&#39;&#37;b &#37;e &#37;I&#58;&#37;M &#37;p&#39;&#44;&#36;uPosted&#41;&#46;&#34;&#34;&#59;
&#43; &#36;date &#61; &#34;&#34;&#46;safe&#95;strftime&#40;&#39;&#37;b &#37;e &#37;H&#58;&#37;M&#39;&#44;&#36;uPosted&#41;&#46;&#34;&#34;&#59;

&#36;editlink &#61; eLink&#40;&#39;discuss&#39;&#44;&#39;discuss&#95;edit&#39;&#44;&#39;discussid&#39;&#44;&#36;discussid&#44;&#36;date&#41;&#59; &#36;cbox &#61; fInput&#40;&#39;checkbox&#39;&#44;&#39;selected&#91;&#93;&#39;&#44;&#36;discussid&#41;&#59;

</code></pre>

</code></pre>


Mariano AbsatzEl 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

Board footer

Powered by FluxBB