Thread View: comp.mail.headers
3 messages
3 total messages
Started by teletel
Sun, 20 Aug 1995 08:00
Date HELP !!!
Author: teletel
Date: Sun, 20 Aug 1995 08:00
Date: Sun, 20 Aug 1995 08:00
11 lines
607 bytes
607 bytes
Please !! I need a "c" source code for converting litral date in the "Date:" field of E-Mail Header into a simple "YYMMDD" format please help me Erez Pilosof teletel@elronet.co.il
Re: Date HELP !!!
Author: John R Buchan (jatmon)
Date: Mon, 21 Aug 1995 00:17
Date: Mon, 21 Aug 1995 00:17
18 lines
910 bytes
910 bytes
In article <41841c$jn6@elron2.elron.net>, teletel@elronet.co.il says... > > >Please !! > >I need a "c" source code for converting >litral date in the "Date:" field of E-Mail Header >into a simple "YYMMDD" format > Assuming that the format of the string remains constant you could try sscanf with a format string similar to: "%*s %[^,], %d %s %d %d:%d:%d %s" -- John R Buchan -:|:- Looking for that elusive FAQ? ftp to: jatmon@mail.iag.net -:|:- rtfm.mit.edu /pub/usenet-by-group/....
Re: Date HELP !!!
Author: Kari E. Hurtta
Date: Mon, 21 Aug 1995 06:20
Date: Mon, 21 Aug 1995 06:20
107 lines
5479 bytes
5479 bytes
[ Followups to comp.mail.headers.
It talks about STD 11 (RFC 822). ]
jatmon@iag.net (John R Buchan (jatmon)) writes in comp.mail.headers
and comp.lang.c:
»In article <41841c$jn6@elron2.elron.net>, teletel@elronet.co.il says...
»>I need a "c" source code for converting
»>litral date in the "Date:" field of E-Mail Header
»>into a simple "YYMMDD" format
»Assuming that the format of the string remains constant
»you could try sscanf with a format string similar to:
»"%*s %[^,], %d %s %d %d:%d:%d %s"
Notice that weekday is optional. Quote from grammal of STD 11 (RFC 822):
| date-time = [ day "," ] date time ; dd mm yy
| ; hh:mm:ss zzz
|
|
| day = "Mon" / "Tue" / "Wed" / "Thu"
| / "Fri" / "Sat" / "Sun"
|
| date = 1*2DIGIT month 2DIGIT ; day month year
| ; e.g. 20 Jun 82
|
| time = hour zone ; ANSI and Military
|
| hour = 2DIGIT ":" 2DIGIT [":" 2DIGIT]
| ; 00:00:00 - 23:59:59
|
| zone = "UT" / "GMT" ; Universal Time
| ; North American : UT
| / "EST" / "EDT" ; Eastern: - 5/ - 4
| / "CST" / "CDT" ; Central: - 6/ - 5
| / "MST" / "MDT" ; Mountain: - 7/ - 6
| / "PST" / "PDT" ; Pacific: - 8/ - 7
| / 1ALPHA ; Military: Z = UT;
| ; A:-1; (J not used)
| ; M:-12; N:+1; Y:+12
| / ( ("+" / "-") 4DIGIT ) ; Local differential
| ; hours+min. (HHMM)
STD 3 (RFC 1123) changes this:
| 5.2.14 RFC-822 Date and Time Specification: RFC-822 Section 5
|
| The syntax for the date is hereby changed to:
|
| date = 1*2DIGIT month 2*4DIGIT
|
| All mail software SHOULD use 4-digit years in dates, to ease
| the transition to the next century.
|
| There is a strong trend towards the use of numeric timezone
| indicators, and implementations SHOULD use numeric timezones
| instead of timezone names. However, all implementations MUST
| accept either notation. If timezone names are used, they MUST
| be exactly as defined in RFC-822.
|
| The military time zones are specified incorrectly in RFC-822:
| they count the wrong way from UT (the signs are reversed). As
| a result, military time zones in RFC-822 headers carry no
| information.
|
| Finally, note that there is a typo in the definition of "zone"
| in the syntax summary of appendix D; the correct definition
| occurs in Section 3 of RFC-822.
I don't found defination of "zone" from Section 3 of RFC-822. Instead it is
in Section 5:
| 5. DATE AND TIME SPECIFICATION
|
| 5.1. SYNTAX
|
| date-time = [ day "," ] date time ; dd mm yy
| ; hh:mm:ss zzz
|
| day = "Mon" / "Tue" / "Wed" / "Thu"
| / "Fri" / "Sat" / "Sun"
|
| date = 1*2DIGIT month 2DIGIT ; day month year
| ; e.g. 20 Jun 82
|
| month = "Jan" / "Feb" / "Mar" / "Apr"
| / "May" / "Jun" / "Jul" / "Aug"
| / "Sep" / "Oct" / "Nov" / "Dec"
|
| time = hour zone ; ANSI and Military
|
| hour = 2DIGIT ":" 2DIGIT [":" 2DIGIT]
| ; 00:00:00 - 23:59:59
|
| zone = "UT" / "GMT" ; Universal Time
| ; North American : UT
| / "EST" / "EDT" ; Eastern: - 5/ - 4
| / "CST" / "CDT" ; Central: - 6/ - 5
| / "MST" / "MDT" ; Mountain: - 7/ - 6
| / "PST" / "PDT" ; Pacific: - 8/ - 7
| / 1ALPHA ; Military: Z = UT;
| ; A:-1; (J not used)
| ; M:-12; N:+1; Y:+12
| / ( ("+" / "-") 4DIGIT ) ; Local differential
| ; hours+min. (HHMM)
|
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads