Skip to content

Commit 9b56503

Browse files
committed
Make sure that timestamp aliases are ordered (alphabetically), to avoid spurious database changes on regeneration.
1 parent bde4287 commit 9b56503

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: dev/HarvestData.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,8 @@ protected static String getEffectiveValue (Map <String, String> locale_data, Str
326326
protected static void printTimezoneData () throws Exception
327327
{
328328
var data = new LinkedHashMap <ZoneId, List <Object>> ();
329-
var matching_abbreviation_aliases = new LinkedHashMap <String, ZoneId> ();
330-
var aliases = new LinkedHashMap <String, Set <ZoneId>> ();
329+
var matching_abbreviation_aliases = new HashMap <String, ZoneId> ();
330+
var aliases = new HashMap <String, Set <ZoneId>> ();
331331
var abbreviation_retriever = DateTimeFormatter.ofPattern ("z", Locale.ENGLISH);
332332
var full_name_retriever = DateTimeFormatter.ofPattern ("zzzz", Locale.ENGLISH);
333333
var utc_formatter = DateTimeFormatter.ofPattern ("yyyy-MM-dd HH:mm:ss z");
@@ -496,7 +496,7 @@ else if (entry.getValue ().size () != 1)
496496
// Aliases don't go into names: they are relatively few and are not used for
497497
// formatting or parsing, currently only when determining OS timezone.
498498
System.out.format ("(:aliases\n %s)\n",
499-
aliases.entrySet ().stream ()
499+
aliases.entrySet ().stream ().sorted ((a, b) -> a.getKey ().compareTo (b.getKey ()))
500500
.map ((entry) -> String.format ("(%s . %s)", quoteString (entry.getKey ()), entry.getValue ().iterator ().next ().getId ()))
501501
.collect (Collectors.joining ("\n ")));
502502

0 commit comments

Comments
 (0)