Question: Can anybody tell about three things:

1. How to retrieve TimeZone from java.util.Date instance?
2. How to know whether Daylight savings is applicable?  
I suppose I can know it by doing timeZone.getDSTSavings, but problem I am facing is that even if I make my system's date as Feb 1 2012, still I am getting the value as positive (I guess 3600000)
3. How to convert EST time to EDT or vice versa?

Answer: 
> 
> How to retrieve TimeZone from java.util.Date instance?
> 
> 
> 

There's no such thing. A `Date` *just* represents a number of milliseconds since the Unix epoch, which was midnight on January 1st 1970 UTC. It's not associated with a particular calendar system or time zone. To put it another way, if a friend and I are on the phone together (with a zero latency ;) and I click my fingers, we would both agree on the `Date` at which that click too place - even if I'm using the Gregorian calendar and he's using the Julian calendar, and even if I'm in London and he's in New York. It's the same *instant in time*.

> 
> How to know whether Daylight savings is applicable?, I suppose I can know it by doing timeZone.getDSTSavings, but problem I am facing is that even if I make my system's date as Feb 1 2012, still I am getting the value as positive (I guess 3600000)
> 
> 
> 

Ideally, use [Joda Time](http://joda-time.sf.net) instead of `java.util.Date`/`Calendar`/`TimeZone`, but within `TimeZone` you can use [`TimeZone.getOffset(long)`](http://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html#getOffset%28long%29) to find the offset from UTC, or [`TimeZone.inDaylightTime(Date)`](http://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html#inDaylightTime%28java.util.Date%29) to just give you a yes/no answer.

> 
> How to convert EST time to EDT or vice versa?
> 
> 
> 

Usually that's an invalid question - because at any one instance in time, *either* EST *or* EDT applies. You normally convert from one *time zone* to another, and "EDT" and "EST" aren't different time zones - they're different offsets within the *same* time zone. The fact that you're asking for this suggests that you may be modelling your data incorrectly to start with (which is unfortunately easy to do with date/time values). Please give us more information and we may be able to help you more.
I ran into a similar problem. The following solution is in Matlab but calling Java, and my changes are just comments because I'm working with Matlab datenum values. You wouldn't really be able to convert timezone aware values, since they are the same timezone, but this may help with raw values that are not timezone aware.

```
%c1 GregorianCalendar of now
%c2 GregorianCalendar of date in question
tz1 = c1.getTimeZone; %Note t2 would be the same

in1 = tz1.inDaylightTime(c1.getTime);
in2 = tz1.inDaylightTime(c2.getTime);

if (in1 == in2)
    %do nothing
elseif in1
    %c1 EDT, c2 is EST
    %Subtract 1 hour to c2
else
    %c1 EST, c2 EDT
    %Add 1 hour to c2
end

```