DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder();
// Append date and time components
builder.append(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
// Append zone text with preferred zones
builder.appendZoneText(TextStyle.SHORT, Set.of(ZoneId.of("Asia/Tokyo"),ZoneId.of("America/Los_Angeles")));
// Create the DateTimeFormatter
DateTimeFormatter formatter = builder.toFormatter();
// Format a date and time
ZonedDateTime dateTime = ZonedDateTime.now();
String formattedText = dateTime.format(formatter);
// Print the formatted text
System.out.println(formattedText);
Если я предоставлю зону, которой нет в предпочитаемом наборе, я считаю, что это не имеет значения.
Что происходит если я предоставлю зону, которой нет в предпочитаемом наборе?
[code]DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder();
// Append date and time components builder.append(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
// Append zone text with preferred zones builder.appendZoneText(TextStyle.SHORT, Set.of(ZoneId.of("Asia/Tokyo"),ZoneId.of("America/Los_Angeles")));
// Create the DateTimeFormatter DateTimeFormatter formatter = builder.toFormatter();
// Format a date and time ZonedDateTime dateTime = ZonedDateTime.now(); String formattedText = dateTime.format(formatter);
// Print the formatted text System.out.println(formattedText); [/code] Если я предоставлю зону, которой [b]нет[/b] в предпочитаемом наборе, я считаю, что это не имеет значения. Что происходит если я предоставлю зону, которой [b]нет[/b] в предпочитаемом наборе?
Я использую библиотеку AMD-дисплея, которая в основном позволяет нам управлять определенными параметрами GPU (Clock Speess/Fan Control).
SDK поставляется с кодом, управляемым образцом , и я смог получить требуемый результат (Core и Clock Speems) от...
java.time.format.TextStyle enum has the following options:
/**
* Full text, typically the full description.
* For example, day-of-week Monday might output Monday .
*/
FULL(Calendar.LONG_FORMAT, 0),
/**
* Full text for stand-alone use, typically the...