[R] strptime with +03:00 zone designator
    Joshua Ulrich 
    jo@h@m@u|r|ch @end|ng |rom gm@||@com
       
    Mon Nov  6 18:07:22 CET 2023
    
    
  
On Mon, Nov 6, 2023 at 3:02 AM Martin Maechler
<maechler using stat.math.ethz.ch> wrote:
>
> >>>>> Richard O'Keefe
> >>>>>     on Mon, 6 Nov 2023 18:37:34 +1300 writes:
>
>     > Thanks to all who replied.  On Mon, 6 Nov 2023 at 18:37,
>     > Richard O'Keefe <raoknz using gmail.com> wrote:
>
>     >> OK, so the consensus is (1) One cannot make strptime
>     >> accept ISO8601-compliant zone designators (2) The
>     >> lubridate package can (3) Or one can hack away with
>     >> regex.  Lubridate it is, then.
>     >>
>     >> But I do regard strptime's inability to process
>     >> ISO8601-compliant zone designators as a bug.
>
> Did you try to submit it to R's bugzilla?
>
> It's the first time I hear of this "Feature" of the ISO
> standard, but then I'm not at all a timezone, and even less an
> ISO standard expert.
>
FWIW, the timezone offset format (%z) is handled in
src/main/Rstrptime.h around line 987. There's a comment that only the
RFC 822 form is recognized (+/-HHMM). The fix may be as simple as
ignoring the ':' in the while() loop.
> Best,
> Martin
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
    
    
More information about the R-help
mailing list