Results 1 to 2 of 2
  1. #1
    justc1 is offline Member
    Join Date
    Jun 2011
    Posts
    1
    Rep Power
    0

    Default TimeZone confusion

    Right now LA is on PDT. Here is a simply program:

    Java Code:
    import java.util.TimeZone;
    public class TimeZoneTest {
    	public static void main(String[] args) {
    		TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles");
    		System.out.println(tz.getDisplayName());
    	}
    }
    It prints out:

    Pacific Standard Time

    Though it should be printing out:

    Pacific Daylight Time

    What am I doing wrong here?

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,425
    Rep Power
    20

Similar Threads

  1. Timezone in java
    By deeparanbhor in forum New To Java
    Replies: 0
    Last Post: 05-28-2009, 02:12 PM
  2. Regarding olson timezone database
    By navneet.tech2009@gmail.co in forum New To Java
    Replies: 0
    Last Post: 09-23-2008, 01:47 PM
  3. How to use TimeZone class of java
    By Java Tip in forum java.util
    Replies: 0
    Last Post: 04-06-2008, 08:39 PM
  4. How to accurately test if timezone data is updated?
    By Santhosh in forum Advanced Java
    Replies: 0
    Last Post: 11-14-2007, 07:53 AM
  5. Replies: 0
    Last Post: 11-06-2007, 03:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •