🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #70288

Re: format for date ?

#70288
From: Nollaig MacKenzie
Date: Mon, 08 Jan 2001 16:43
41 lines
1859 bytes
On 2001.01.08 11:36:21,
the amazing <prence@aclindia.net> declared:

> I need to process the Date: header in news articles and display it in
> a standard format.
> 
> What kind of different formats can I expect to receive in the Date
> header and what is the best way I can format them under a standardizes
> scheme for display purposes ?
> 
> Thanks.

You are posting with Free Agent, which doesn't
run under Linux, I think, so a Linux answer is
probably irrelevant.... In Linux what you want
is built into the "date" function; you could use

date "${format}" -d "${string}"

	e.g. if format were

+%Y.%m.%d %T

	and string were

Mon Jan 8 11:23:06 EST 2001

date "${format}" -d "${string}"

	would be

2001.01.08 11:23:06

Cheers, N.

-- 
Nollaig MacKenzie <nollaig@amhuinnsuidhe.cx>
	http://www.amhuinnsuidhe.cx
Oppose renaming Mt Logan!! http://www.savemtlogan.com
Technical Details
Message-ID: <slrn95jr3b.40q.nollaig@amhuinnsuidhe.cx>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!falcon.america.net!sunqbc.risq.qc.ca!news3.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail
References: <3a596bb0.5865114@news.alt.net>

Show Full Headers
Complete Article Headers
Message-ID: <slrn95jr3b.40q.nollaig@amhuinnsuidhe.cx>
Subject: Re: format for date ?
Date: Mon, 08 Jan 2001 16:43:02 GMT
From: nollaig@amhuinnsuidhe.cx (Nollaig MacKenzie)
References: <3a596bb0.5865114@news.alt.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!falcon.america.net!sunqbc.risq.qc.ca!news3.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail
Newsgroups: news.software.readers
Reply-To: nollaig@amhuinnsuidhe.cx
User-Agent: slrn/0.9.6.3pl1 (Linux)
Lines: 40
NNTP-Posting-Host: 64.230.40.243
X-Trace: news20.bellglobal.com 978972182 64.230.40.243 (Mon, 08 Jan 2001 11:43:02 EST)
NNTP-Posting-Date: Mon, 08 Jan 2001 11:43:02 EST
Organization: Sympatico