I am a bit confused. I am trying to get the system time to display in a label on one of my applications. I created a GregorianCalendar object, and called method getTime(), but the time it returns is one hour earlier than what my PC clock is displaying. Can anyone help me understand why?
Does your location adjust for Daylight Savings Time? If so, this may be a part of the problem. You should check if the timezone used by your GregorianCalendar object is Standard or Daylight Savings Time.