1. Question about using a specific TimeZone to set a GregorianCalendar... coderanch.comWhat I am trying to do is create a Gregorian calendar and set the time to one second before Daylight Saving Time begins, and print it out. Then I want to reset the time to 2:00 am and see if it realizes it is now in EDT. Okay... so here's my sample code: TimeZone tz = TimeZone.getTimeZone("Americas/New_York"); GregorianCalendar calendar = new ... |
2. Adjusting GregorianCalendar to reflect a specific TimeZone coderanch.comWhen you set the timezone for a Calendar object, then any arithmetic you do (e.g. adding 6 days) will be done with respect to that timezone -- in particular with respect to its daylight saving time settings. That's what it's for. When you use the DateFormat.format() method, it's working with a Date object which was extracted from the Calendar. A Date ... |
3. How to create a GregorianCalendar with timezone information forums.oracle.comHello All, Can any one tell me how to create a GregorianCalendar with time zone information i.e I have following information with me year month day hour minutes seconds deci-seconds direction from UTC "+" / "-" (in ascii notation) hours from UTC minutes from UTC How can i construct a calender out of it? |
4. GregorianCalendar TimeZone forums.oracle.comI'm running an application on a computer located in Eastern Daylight Time and the system time is set accordingly. I create a GregorianCalendar with specific year, month, day, hours, min, sec. Then I set the TimeZone to "America/Los_Angeles" in this GregorianCalendar instance. When I print the date string it always shows EDT. workingCalendar.getTime().toString() yields: Tue Jun 19 10:00:00 EDT 2007 I ... |