/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

import java.time.* ;
import java.time.format.* ;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{

        System.out.println( "Demonstration of IdeOne.com refusing to localize. Apparently a non-standard JVM.") ;

		Locale before = Locale.getDefault() ;
		Locale.setDefault( Locale.FRANCE ) ;  
		Locale after = Locale.getDefault() ;
		
		System.out.println( before) ;
		System.out.println( after ) ;
		
		ZonedDateTime zdt = ZonedDateTime.now(
			ZoneId.of( "Pacific/Auckland" )
		);
		
		// Use JVM’s current default `Locale`… but we get US English?
		DateTimeFormatter f = 
		    DateTimeFormatter.ofLocalizedDateTime( FormatStyle.LONG )
		    //.withLocale( Locale.FRANCE ) 
		;
		String output = zdt.format( f ) ;
		System.out.println( output ) ;
		
		// Explicitly set Locale.FRANCE… but we still get US English?
		DateTimeFormatter f2 = 
		    DateTimeFormatter.ofLocalizedDateTime( FormatStyle.LONG )
		    .withLocale( Locale.FRANCE ) 
		;
		String output2 = zdt.format( f ) ;
		System.out.println( output2 ) ;

	}
}