public TimeZone getTimeZone() { final ClientProperties properties = getClientInfo().getProperties(); TimeZone timeZone = properties.getTimeZone(); if (timeZone == null) { timeZone = TimeZone.getDefault(); } return timeZone; } }
public ZoneId getClientZoneId() { TimeZone timeZone = getClientInfo().getProperties().getTimeZone(); return timeZone != null ? timeZone.toZoneId() : ZoneId.systemDefault(); } }
/** * Gets the client's time zone. * * @return The client's time zone or null */ protected TimeZone getClientTimeZone() { ClientInfo info = Session.get().getClientInfo(); if (info instanceof WebClientInfo) { return ((WebClientInfo)info).getProperties().getTimeZone(); } return null; }
/** * What is the {@link ZoneId} of the client. * * @see RequestCycleSettings#getGatherExtendedBrowserInfo() * @see ZoneId#systemDefault() */ protected ZoneId getClientTimeZone() { ClientInfo info = Session.get().getClientInfo(); if (info instanceof WebClientInfo) { TimeZone timeZone = ((WebClientInfo)info).getProperties().getTimeZone(); return timeZone != null ? timeZone.toZoneId() : null; } return ZoneId.systemDefault(); }
/** * Gets the client's time zone. * * @return The client's time zone or null */ protected TimeZone getClientTimeZone() { ClientInfo info = Session.get().getClientInfo(); if (info instanceof WebClientInfo) { return ((WebClientInfo)info).getProperties().getTimeZone(); } return null; }
/** * Gets the client's time zone. * * @return The client's time zone or null */ protected TimeZone getClientTimeZone() { ClientInfo info = Session.get().getClientInfo(); if (info instanceof WebClientInfo) { return ((WebClientInfo)info).getProperties().getTimeZone(); } return null; }
/** * Gets the client's time zone. * * @return The client's time zone or null */ protected TimeZone getClientTimeZone() { ClientInfo info = Session.get().getClientInfo(); if (info instanceof WebClientInfo) { return ((WebClientInfo)info).getProperties().getTimeZone(); } return null; }
final TimeZone timeZone = userSession.getClientInfo().getProperties().getTimeZone(); if (timeZone != null) { this.timeZone = timeZone.getID();