Article View: news.software.readers
Article #239758--
From: Unknown
Date: Sun, 21 Feb 2010 16:00
Date: Sun, 21 Feb 2010 16:00
25 lines
2108 bytes
2108 bytes
Pieter Zijlstra, may I see the code you use to create your Date line* ?
*: “ Date: Thu, 11 Feb 2010 23:25:42 +0100 ”.
My server's clock was 6 minutes late, so now I create my own Date line.
I'm in the Pacific Time Zone ( Seattle, “UTC - 8”, “-0800” ) and
Visual C++'s “_timezone” is the positive integer:
“ 8 * 60 * 60 ” ( i.e. in seconds ).
So, the code to generate a “standard” Date line is:
wchar_t Date·Line[88]; unsigned __int64 Date_Now = time( 0 );
············
tm *TimeRec = localtime( ( time_t * ) &Date_Now );
wchar_t *pST = Date·Line ;
pST += wcsftime( Date·Line, 88, L"%a, %d %b %Y %H:%M:%S ", TimeRec );
int Min = _timezone, Neg = Min > 0, Hr ;
Min = abs( Min ) / 60, Hr = Min / 60, Min -= 60 * Hr ;
pST += Str( pST, L"%c%04d ", Neg ? '-' : '+', 100 * Hr + Min );
// There are hundreds of time zone names, no abbreviations.
wcsftime( pST, 88, L"(%z)", TimeRec );
Technical Details
Message-ID:
<JeffRelf.F-M.FM.vp@2010_Feb21.8.00am>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.free.newsservers.20150605.mbox.gz!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!news-spur1.glorb.com!newsread.glorb.com!not-for-mailReferences:
<7tg6rlF9dpU1@mid.individual.net> <hl0t6i$jr8$1@news.eternal-september.org> <7tieq6FovvU1@mid.individual.net> <JeffRelf.F-M.FM.0O@2010_Feb11.6.58am> <xn0gqa0j92oqzta005@newszilla.xs4all.nl> <JeffRelf.F-M.FM.52@2010_Feb11.3.43pm>Show Full Headers
Complete Article Headers
Message-ID: <JeffRelf.F-M.FM.vp@2010_Feb21.8.00am> Subject: -- Date: Sun, 21 Feb 2010 16:00:43 +0000 From: Unknown <anon@nohost.local> References: <7tg6rlF9dpU1@mid.individual.net> <hl0t6i$jr8$1@news.eternal-september.org> <7tieq6FovvU1@mid.individual.net> <JeffRelf.F-M.FM.0O@2010_Feb11.6.58am> <xn0gqa0j92oqzta005@newszilla.xs4all.nl> <JeffRelf.F-M.FM.52@2010_Feb11.3.43pm> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.free.newsservers.20150605.mbox.gz!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!news-spur1.glorb.com!newsread.glorb.com!not-for-mail Newsgroups: alt.free.newsservers,news.software.readers Organization: JeffRelf.F-M.FM Lines: 25 NNTP-Posting-Host: C8XMtmCTxjuHFkDpiBVa7Q.763.posting.glorb.com Content-Type: Text/Plain; charset=UTF-8 X-Complaints-To: abuse@glorb.com NNTP-Posting-Date: Sun, 21 Feb 2010 15:55:53 +0000 (UTC) User-Agent: JeffRelf.F-M.FM/X.EXE X-Notice: Scanned by Mr. Bill