/** * Sets the timezone associated with this date-time instance. If the * specified timezone is null, it will reset to the default timezone. If the * date-time instance is utc, it will turn into either a floating (no * timezone) date-time, or a date-time with a timezone. * * @param timezone * a timezone to apply to the instance */ public final void setTimeZone(final TimeZone timezone) { this.timezone = timezone; if (timezone != null) { getFormat().setTimeZone(timezone); } else { resetTimeZone(); } time = new Time(time, getFormat().getTimeZone(), false); }
/** * Sets the timezone associated with this date-time instance. If the specified timezone is null, it will reset * to the default timezone. If the date-time instance is utc, it will turn into * either a floating (no timezone) date-time, or a date-time with a timezone. * @param timezone a timezone to apply to the instance */ public final void setTimeZone(final TimeZone timezone) { this.timezone = timezone; if (timezone != null) { getFormat().setTimeZone(timezone); } else { resetTimeZone(); } time = new Time(time, getFormat().getTimeZone(), false); }
/** * Sets the timezone associated with this date-time instance. If the * specified timezone is null, it will reset to the default timezone. If the * date-time instance is utc, it will turn into either a floating (no * timezone) date-time, or a date-time with a timezone. * * @param timezone * a timezone to apply to the instance */ public final void setTimeZone(final TimeZone timezone) { this.timezone = timezone; if (timezone != null) { getFormat().setTimeZone(timezone); } else { resetTimeZone(); } time = new Time(time, getFormat().getTimeZone(), false); }
/** * Sets the timezone associated with this date-time instance. If the * specified timezone is null, it will reset to the default timezone. If the * date-time instance is utc, it will turn into either a floating (no * timezone) date-time, or a date-time with a timezone. * * @param timezone * a timezone to apply to the instance */ public final void setTimeZone(final TimeZone timezone) { this.timezone = timezone; if (timezone != null) { getFormat().setTimeZone(timezone); } else { resetTimeZone(); } time = new Time(time, getFormat().getTimeZone(), false); }
/** * Sets the timezone associated with this date-time instance. If the * specified timezone is null, it will reset to the default timezone. If the * date-time instance is utc, it will turn into either a floating (no * timezone) date-time, or a date-time with a timezone. * * @param timezone * a timezone to apply to the instance */ public final void setTimeZone(final TimeZone timezone) { this.timezone = timezone; if (timezone != null) { getFormat().setTimeZone(timezone); } else { resetTimeZone(); } time = new Time(time, getFormat().getTimeZone(), false); }
/** * Updates this date-time to display in UTC time if the argument is true. * Otherwise, resets to the default timezone. * * @param utc * The utc to set. */ public final void setUtc(final boolean utc) { // reset the timezone associated with this instance.. this.timezone = null; if (utc) { getFormat().setTimeZone(TimeZones.getUtcTimeZone()); } else { resetTimeZone(); } time = new Time(time, getFormat().getTimeZone(), utc); }
/** * Updates this date-time to display in UTC time if the argument is true. Otherwise, resets to the default timezone. * @param utc The utc to set. */ public final void setUtc(final boolean utc) { // reset the timezone associated with this instance.. this.timezone = null; if (utc) { getFormat().setTimeZone(TimeZone.getTimeZone(TimeZones.UTC_ID)); } else { resetTimeZone(); } time = new Time(time, getFormat().getTimeZone(), utc); }
/** * Updates this date-time to display in UTC time if the argument is true. * Otherwise, resets to the default timezone. * * @param utc * The utc to set. */ public final void setUtc(final boolean utc) { // reset the timezone associated with this instance.. this.timezone = null; if (utc) { getFormat().setTimeZone(TimeZones.getUtcTimeZone()); } else { resetTimeZone(); } time = new Time(time, getFormat().getTimeZone(), utc); }
/** * Updates this date-time to display in UTC time if the argument is true. * Otherwise, resets to the default timezone. * * @param utc * The utc to set. */ public final void setUtc(final boolean utc) { // reset the timezone associated with this instance.. this.timezone = null; if (utc) { getFormat().setTimeZone(TimeZones.getUtcTimeZone()); } else { resetTimeZone(); } time = new Time(time, getFormat().getTimeZone(), utc); }
/** * Updates this date-time to display in UTC time if the argument is true. * Otherwise, resets to the default timezone. * * @param utc * The utc to set. */ public final void setUtc(final boolean utc) { // reset the timezone associated with this instance.. this.timezone = null; if (utc) { getFormat().setTimeZone(TimeZones.getUtcTimeZone()); } else { resetTimeZone(); } time = new Time(time, getFormat().getTimeZone(), utc); }