Fix TimeZone
This commit is contained in:
@ -12,10 +12,7 @@ import java.nio.file.Path;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author Braydon
|
||||
@ -34,6 +31,8 @@ public final class ReadMeManager {
|
||||
System.out.println("Updating README.md...");
|
||||
try (InputStream templateResource = ReadMeManager.class.getClassLoader().getResourceAsStream("README_TEMPLATE.md")) {
|
||||
assert templateResource != null; // Ensure the template is present
|
||||
Calendar calendarTime = Calendar.getInstance(TimeZone.getTimeZone("America/Toronto"));
|
||||
calendarTime.setTime(new Date());
|
||||
|
||||
// Copy the template README.md to the root directory
|
||||
Path localReadMe = new File("README.md").toPath(); // The local README.md file
|
||||
@ -42,7 +41,7 @@ public final class ReadMeManager {
|
||||
// Replace variables in the README.md file
|
||||
String contents = new String(Files.readAllBytes(localReadMe));
|
||||
contents = contents.replace("<total-servers>", DECIMAL_FORMAT.format(servers.size())); // Total servers variable
|
||||
contents = contents.replace("<last-updated>", DATE_FORMAT.format(new Date()).replace(" ", "_")); // Total servers variable
|
||||
contents = contents.replace("<last-updated>", DATE_FORMAT.format(calendarTime.getTime()).replace(" ", "_")); // Total servers variable
|
||||
|
||||
// Write the total servers per-region table
|
||||
Map<String, Integer> regionCounts = new HashMap<>();
|
||||
|
Reference in New Issue
Block a user