From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24660 invoked by alias); 28 Apr 2012 19:03:49 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17028 Received: (qmail 9864 invoked from network); 28 Apr 2012 19:03:47 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.214.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:subject:x-mailer:mime-version:content-type :content-transfer-encoding:content-disposition; bh=K24DFmXyuJ398tNW4XCXGeR3TA9qrIbYcxS2xjesd8A=; b=TMax340nQQ7zUXkjQNu0KIKrEtQATYjs7X6So1Km/lDdzFPHdxeWHwKapJraliD2Mh VJTgM716QZcAL/h25ISO9f/wn+uBNZvfvOtq5JgAQXW3Jawy0+REmCcY/Moz9+mlHuWU riA81gTAUJcMKoC0E+LymkTIw+Um8swptyP638r/6cR5aJgJbT+ziOLK2xY2pNdmUQIl yqey2Lk+yTWadImzFaCla+LAcmM9ZTaxniIUq7Oay/QmOiI+olK3oiOta1Jei3DlPBOo fbz6gV1eIZywpPmHbJlUAfGABRzJgBhTdOiLZ7NyxkYIBOTJuVz7dxzEhMsZwGniAI0W YtDg== Date: Sat, 28 Apr 2012 14:55:25 -0400 From: TJ Luoma To: zsh-users@zsh.org Message-ID: <29B9CC7BDEB94DA784265196AE5C7EEE@gmail.com> Subject: can strftime show 'p.m.' instead of 'PM'? X-Mailer: sparrow 1.5 (build 1043) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Before I begin, I should say that I realize this may (seem to) be extremely picayune, but it consistently annoys me. Judge me as you will :-) `man strftime` says this: %p is replaced by national representation of either "ante meridiem" (a.m.) or "post meridiem" (p.m.) as appropriate. %F is equivalent to ``%Y-%m-%d''. %r is equivalent to ``%I:%M:%S %p''. However when I do this in zsh $ strftime "%F %r" "$EPOCHSECONDS" I get this: 2012-04-28 02:50:24 PM Ideally I would like "PM" to be "p.m." but I'd probably settle for "pm" I tried using '%P' instead of '%p' (thinking that might invert the case) but that just gave me a literal 'P' instead. I realize that I could use: strftime "%F %r" "$EPOCHSECONDS" | tr '[A-Z]' '[a-z]' or even strftime "%F %r" "$EPOCHSECONDS" | sed 's#AM#a.m#g; s#pPM#p.m.#g' but I wondered if there was a better (more efficient) way. Thanks TjL