From e6970e1c911e40101616dcde32bcf0863df1a968 Mon Sep 17 00:00:00 2001 From: "ray.j.greenwell" Date: Thu, 11 Feb 2010 22:03:26 +0000 Subject: [PATCH] Via Nathan Curtis: A method on Builder to set the TimeZone. git-svn-id: https://samskivert.googlecode.com/svn/trunk@2747 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- src/java/com/samskivert/util/Calendars.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/java/com/samskivert/util/Calendars.java b/src/java/com/samskivert/util/Calendars.java index dfcbaffb..10cf4028 100644 --- a/src/java/com/samskivert/util/Calendars.java +++ b/src/java/com/samskivert/util/Calendars.java @@ -3,7 +3,7 @@ // // samskivert library - useful routines for java programs // Copyright (C) 2001-2010 Michael Bayne, et al. -// +// // This library is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License as published // by the Free Software Foundation; either version 2.1 of the License, or @@ -104,6 +104,12 @@ public class Calendars return zeroTime(); } + /** See {@link Calendar#setTimeZone(TimeZone)}. */ + public Builder in (TimeZone zone) { + _calendar.setTimeZone(zone); + return this; + } + /** Zeros out the time fields of this calendar, preserving only the date. */ public Builder zeroTime () { _calendar.set(Calendar.HOUR_OF_DAY, 0);