Let's actually remove these files

This commit is contained in:
Focusvity 2023-03-08 22:48:51 +11:00
parent 77be23faf0
commit 00b6473e4d
No known key found for this signature in database
GPG Key ID: 85AD157561ABE94B
2 changed files with 0 additions and 43 deletions

View File

@ -1,23 +0,0 @@
package dev.plex.util.adapter;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;
import dev.plex.Plex;
import java.lang.reflect.Type;
import java.time.Instant;
import java.time.ZoneId;
import java.time.ZonedDateTime;
public class ZonedDateTimeDeserializer implements JsonDeserializer<ZonedDateTime>
{
private static final String TIMEZONE = Plex.get().config.getString("server.timezone");
@Override
public ZonedDateTime deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException
{
Instant instant = Instant.ofEpochMilli(json.getAsJsonPrimitive().getAsLong());
return ZonedDateTime.ofInstant(instant, ZoneId.of(TIMEZONE));
}
}

View File

@ -1,20 +0,0 @@
package dev.plex.util.adapter;
import com.google.gson.JsonElement;
import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import dev.plex.Plex;
import java.lang.reflect.Type;
import java.time.ZonedDateTime;
public class ZonedDateTimeSerializer implements JsonSerializer<ZonedDateTime>
{
private static final String TIMEZONE = Plex.get().config.getString("server.timezone");
@Override
public JsonElement serialize(ZonedDateTime src, Type typeOfSrc, JsonSerializationContext context)
{
return new JsonPrimitive(src.toInstant().toEpochMilli());
}
}