Re: RFR: 8282769: BSD date cannot handle all ISO 8601 formats

2022-03-07 Thread Magnus Ihse Bursie
On Mon, 7 Mar 2022 22:47:13 GMT, Magnus Ihse Bursie  wrote:

> The BSD version of the date command that ships with macOS cannot handle all 
> ISO 8601 formats. More specifically, it cannot handle trailing milliseconds.
> 
> This fix will allow it to be more tolerant.

Yes, in theory we are. In practice, ISO 8601 timestamps tend to use UTC (ending 
with Z), which this will default to. But if a non-UTC timestamp was present, it 
will be lost.

The alternative is that configure crashes. :( I think that's worse. In all 
honesty, people suck at getting time zone information correct anyway ;-)

Ideally, there would be a date format string that ignores the decimals. 
However, the %3N syntax seems to be GNU specific and not understood by BSD 
date, and I've found no other way. (The official documentation is really, 
really bad at presenting the legal format codes for parsing.)

-

PR: https://git.openjdk.java.net/jdk/pull/7733


Re: RFR: 8282769: BSD date cannot handle all ISO 8601 formats

2022-03-07 Thread Erik Joelsson
On Mon, 7 Mar 2022 22:47:13 GMT, Magnus Ihse Bursie  wrote:

> The BSD version of the date command that ships with macOS cannot handle all 
> ISO 8601 formats. More specifically, it cannot handle trailing milliseconds.
> 
> This fix will allow it to be more tolerant.

Are we losing the timezone when using this fallback? I'm not sure if that is 
actually better behavior.

-

Marked as reviewed by erikj (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7733


RFR: 8282769: BSD date cannot handle all ISO 8601 formats

2022-03-07 Thread Magnus Ihse Bursie
The BSD version of the date command that ships with macOS cannot handle all ISO 
8601 formats. More specifically, it cannot handle trailing milliseconds.

This fix will allow it to be more tolerant.

-

Commit messages:
 - 8282769: BSD date cannot handle all ISO 8601 formats

Changes: https://git.openjdk.java.net/jdk/pull/7733/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk=7733=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8282769
  Stats: 7 lines in 1 file changed: 0 ins; 2 del; 5 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7733.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7733/head:pull/7733

PR: https://git.openjdk.java.net/jdk/pull/7733