19 package org.sleuthkit.autopsy.timeline.ui;
21 import java.time.ZoneOffset;
22 import java.util.Date;
23 import java.util.TimeZone;
24 import javafx.beans.value.ObservableValue;
25 import javafx.fxml.FXML;
26 import javafx.scene.control.*;
27 import org.openide.util.NbBundle;
47 final String
id = ZoneOffset.ofTotalSeconds(timeZone.getOffset(System.currentTimeMillis()) / 1000).getId();
48 final String timeZoneString =
"(GMT" + (
"Z".equals(
id) ?
"+00:00" : id) +
") " + timeZone.getID() +
" [" + timeZone.getDisplayName(timeZone.observesDaylightTime() && timeZone.inDaylightTime(
new Date()), TimeZone.SHORT) +
"]";
49 return timeZoneString;
56 localRadio.setText(NbBundle.getMessage(
this.getClass(),
"TimeZonePanel.localRadio.text"));
57 otherRadio.setText(NbBundle.getMessage(
this.getClass(),
"TimeZonePanel.otherRadio.text"));
60 localOtherGroup.selectedToggleProperty().addListener(
61 (ObservableValue<? extends Toggle> observable, Toggle oldValue, Toggle newValue) -> {
62 if (newValue == localRadio) {
static String getTimeZoneString(final TimeZone timeZone)
static void construct(Node n, String fxmlFileName)
static synchronized void setTimeZone(TimeZone timeZone)
ToggleGroup localOtherGroup