deep_pick icon indicating copy to clipboard operation
deep_pick copied to clipboard

Add timezone support to date format RFC 1123 / RFC 850 / RFC 1123

Open passsy opened this issue 4 years ago • 0 comments

Currently only GMT/UT are supported.

But more are possible according to the rfc

     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)

https://datatracker.ietf.org/doc/html/rfc822#section-5

These cases are currently not covered:

Wed, 21 Oct 2015 07:28:00 PDT
Wed, 21 Oct 2015 07:28:00 B
Wed, 21 Oct 2015 07:28:00 +7030

Test cases:

  • [ ] RFC 850 Monday, 01-Nov-21 11:53:15 +0000
  • [ ] RFC 1036 Mon, 01 Nov 21 11:53:15 +0000
  • [ ] RFC 1123 Mon, 01 Nov 2021 11:53:15 +0000

passsy avatar Nov 01 '21 12:11 passsy