Questions tagged [rfc1123]

A RFC entitled "Requirements for Internet Hosts -- Application and Support"

See for more details on RFC

RFC 1123 was released in October 1989.

Resources:

19 questions
12
votes
2 answers

Parsing RFC1123 formatted dates in C#, .Net 4.0

I am trying to parse dates in RFC1123 format (Thu, 21 Jan 2010 17:47:00 EST). Here is what I tried but none worked: DateTime Date = DateTime.Parse(dt); DateTime Date = DateTime.ParseExact(dt, "r", null);
Moon
  • 33,439
  • 20
  • 81
  • 132
9
votes
2 answers

What is the difference between RFC1123 and RFC2822 DateTime formatting in PHP?

This is out of curiosity rather than because I need to know it at this point, but in the PHP manual, they're identical; I can't see the reason that there are two different data formats for the same…
MattMatt
  • 2,242
  • 33
  • 30
5
votes
1 answer

What is valid RFC1123 date format

I am working on a service which returns expires header. The service will be working across different timezone. So we need a way to return other timezones than GMT. I know that the http header have to follow RFC1123 standard date format. So the…
Newbee
  • 1,379
  • 2
  • 16
  • 36
4
votes
2 answers

Using RFC-1123 date format with C#, parsing issues for dates on Tuesdays

We ran into a bug in our product caused by the fact that for certain cultures, if you set the current thread's culture to that culture and then output a string based on a DateTime in RFC1123 format and then try to convert it back to a DateTime, it…
andrew.w.lane
  • 118
  • 3
  • 10
4
votes
2 answers

DateTime to RFC-1123 gives inaccurate timezone

If I get the RFC-1123 formatted date of a DateTime object, it gives the current local time, but gives the timezone as GMT (which is inaccurate). DateTime.Now.ToString("r"); returns Fri, 12 Feb 2010 16:23:03 GMT At 4:23 in the afternoon, but my…
Joel Rein
  • 3,608
  • 1
  • 26
  • 32
1
vote
1 answer

Looking to build some regex to validate domain names (RFC 952/ RFC 1123)

One of our clients validates email addresses in their own software prior to firing it via an API call to our system. The issue is however that their validation rules do not match those our system, therefore they are parsing and accepting addresses…
Alex Law
  • 11
  • 1
  • 2
1
vote
0 answers

How to do Russian text validation in java using GNU's Regex..?

I did internationalization for my website.So my website also available in Russian language.But while gathering user information of Russian user from my web page i am not able to validate entered text.Please give me solution to validate Russian text…
Sagar
  • 11
  • 2
1
vote
1 answer

RFC 1123 date representation with Jetty

We're using jetty as front end http server, with cache policies. I would like to be clear on the requirements: Is the quoted below required? How should I implement this in Java? http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html says:…
Maxim Veksler
  • 29,272
  • 38
  • 131
  • 151
1
vote
1 answer

Convert datetime-format from RFC1123 to DateTime-Object

I'm on to convert the RFC1123-dateformat to DateTime-Object and vice versa. The DateTime-Object to RFC-date-string works perfectly but since I'm living in Germany (MEZ- Timezone) I get wrong results. So once, here is my class for converting: public…
Matthias Burger
  • 5,549
  • 7
  • 49
  • 94
1
vote
1 answer

Identify link layer type in python

Obviously we can easily sniff a network with a socket like: socket.socket(socket.PF_PACKET,socket.SOCK_RAW,socket.htons(0x0003) socket.recv(65535) I would like to identify the link layer address type while importing only socket and struct, but…
NationWidePants
  • 447
  • 8
  • 33
1
vote
2 answers

Convert RFC 1123 date to timestamp in PHP

What is the easiest or most elegant way to convert a RFC 1123 date (From an HTTP-Expiration-header) to a UNIX timestamp? Example: Sun, 14 Aug 2005 16:13:03 GMT Do I really have to 'substr' everything?
Christian Studer
  • 24,947
  • 6
  • 46
  • 71
0
votes
1 answer

Convert string to valid RFC1123 DNS Subdomain

Pretty similar to Convert any string to a valid DNS subdomain, except asking it for Python (I'm using 3.10) and (sort of) Kubernetes. Hoping to accomplish this in the most pythonic (i.e. just grab a library that someone else wrote) way…
stevetu21
  • 160
  • 1
  • 8
0
votes
2 answers

Get RFC1123_time in Beanshell ( using JMeter)

Interface need set RFC1123 time in header I can't do it in beanshell using JMeter I know code works in java: SimpleDateFormat sdf3 = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss…
0
votes
0 answers

Is there any way post RFC 1123 formated date in the HTTP date header in dot net

I am trying to invoke service which is expecting RFC 1123 formatted date in the Request header using C#. I using the bellow code:- var req = WebRequest.Create(loginDdsLink) as HttpWebRequest; req.PreAuthenticate = true; req.Method =…
0
votes
1 answer

NodeJS Date parsing "old" rfc1123 dates incorrectly

I have an RFC1123 Date string, such as: 'Mon, 01 Jan 0001 00:00:01 GMT' I want to parse this string into a Date in NodeJS. I assumed that new Date('Mon, 01 Jan 0001 00:00:01 GMT') would achieve what I wanted... but it doesn't. When I inspect the…
Hydraxy
  • 279
  • 2
  • 9
1
2