forked from afspiegeling/NitoriBot
fix the time in the jar not being in my timezone
This commit is contained in:
+6
-9
@@ -1,11 +1,7 @@
|
||||
/*
|
||||
ZoneId timezone = ZoneId.of("America/Chicago");
|
||||
ZonedDateTime zoneDate = ZonedDateTime.now(timezone);
|
||||
LocalDate date = zoneDate.toLocalDate();
|
||||
LocalTime time = zoneDate.toLocalTime();
|
||||
*/
|
||||
import java.time.LocalDateTime
|
||||
import java.time.format.DateTimeFormatter
|
||||
import java.time.ZoneId
|
||||
import java.time.ZonedDateTime
|
||||
|
||||
version = "v9.0.0-alpha"
|
||||
group = "nitoribot"
|
||||
@@ -56,16 +52,17 @@ dependencies {
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
val timeZone = ZoneId.of("America/Chicago");
|
||||
val zoneDate = ZonedDateTime.now(timeZone);
|
||||
val dateTimeFormatter = DateTimeFormatter.ofPattern("MMMM dd, yyyy hh:mm:ss a")
|
||||
val dateTimeInfo = LocalDateTime.now();
|
||||
val dateTimeInfo = zoneDate.toLocalDateTime();
|
||||
|
||||
manifest {
|
||||
attributes["Main-Class"] = "land.chipmunk.parker2991.nitoribot.Main"
|
||||
attributes("Build-Time" to dateTimeFormatter.format(dateTimeInfo))
|
||||
//attributes["Build-Time"] = dateTimeFormatter.format(dateTimeInfo);
|
||||
attributes("Enable-Native-Access" to "ALL-UNNAMED")
|
||||
}
|
||||
//"Custom-Attribute-Name" to "YourCustomValue"
|
||||
|
||||
archiveClassifier.set("all")
|
||||
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
|
||||
@@ -138,14 +138,6 @@ public class Bot extends SessionAdapter {
|
||||
this.bots = bots;
|
||||
this.config = config;
|
||||
|
||||
/*Main.services.put(
|
||||
"bot build information",
|
||||
executorService.submit(() -> {
|
||||
this.botBuildInfo = Main.getBuildInfo();
|
||||
this.repoCommitInfo = Main.getRepoInfo();
|
||||
})
|
||||
);*/
|
||||
|
||||
try {
|
||||
connect();
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user