List of usage examples for java.time ZoneId toString
@Override
public String toString()
From source file:Main.java
public static void main(String[] args) { ZoneId z = ZoneId.systemDefault(); System.out.println(z.toString()); }
From source file:de.rkl.tools.tzconv.model.ApplicationModel.java
private static SetMultimap<ZoneOffset, ZoneId> sortAvailableZoneIds() { final SortedSetMultimap<ZoneOffset, ZoneId> zoneIdMap = TreeMultimap.create(Ordering.natural().reverse(), new Ordering<ZoneId>() { @Override/*from ww w . j av a 2 s . com*/ public int compare(final ZoneId zoneId1, final ZoneId zoneId2) { return ComparisonChain.start().compare(zoneId1.toString(), zoneId2.toString()).result(); } }.nullsFirst()); ZoneId.getAvailableZoneIds().stream().forEach(zoneId -> { final ZoneId zoneIdObject = ZoneId.of(zoneId); zoneIdMap.put(zoneIdObject.getRules().getStandardOffset(Instant.now()), zoneIdObject); }); return ImmutableSetMultimap.copyOf(zoneIdMap); }
From source file:com.inversoft.json.ZoneIdSerializer.java
@Override public void serialize(ZoneId value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { jgen.writeObject(value.toString()); }