michael-o commented on PR #354:
URL: https://github.com/apache/maven-site/pull/354#issuecomment-1345368961

   > > > @michael-o now we have this:
   > > > ```
   > > > [INFO] --- build-helper-maven-plugin:3.3.0:timestamp-property 
(create-security.txt-timestamp) @ maven-site ---
   > > > [WARNING] Using platform locale (en_US actually) to format date/time, 
i.e. build is platform dependent!
   > > > ```
   > > > 
   > > > 
   > > >     
   > > >       
   > > >     
   > > > 
   > > >       
   > > >     
   > > > 
   > > >     
   > > >   
   > > > I still suggest adding root or to explicitly set 
`<locale>ROOT</locale>`.
   > > 
   > > 
   > > This does not work. Again, providing `<locale>ROOT</locale>` will _not_ 
give you `Locale#ROOT`. Look at the code. There is no handling for this. All it 
will give you is `new Locale("root")` which does not exist and is wrong. You 
need something like 
[this](https://github.com/apache/maven-doxia-sitetools/blob/61c80011767d6159e7f4dd7e456a542d98022b24/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java#L847-L850)
 to handle the literal `ROOT`.
   > 
   > I did and I ran it and it worked as expected for me. Minus one hour (I 
live in Europe/Berlin).
   > 
   > Code path:
   > 
   > ```
   > Locale locale;
   >          if ( this.locale != null )
   >         {
   >             String[] bits = this.locale.split( "[,_]" );
   >             if ( bits.length == 1 )
   >             {
   >                  locale = new Locale( bits[0].trim() );
   >             }
   > ```
   > 
   > It splits "ROOT" wich returns length 1 and Will just pass it though.
   > 
   > I still don't know how you think it's going to be lower case.
   > 
   > As an alternative, we can pass in
   > 
   > ```
   > <locale>${user.lang}_${user.country}</locale>
   > ```
   > 
   > ...which is the same, but just explicit.
   
   Read the specs of the `Locale` constructor and what `Locale#ROOT` is. You 
are misunderstanding the behavior. It does not give you what you expect.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to