Java Doc for SimpleTimeZone.java in  » Apache-Harmony-Java-SE » java-package » java » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » java package » java.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.TimeZone
      java.util.SimpleTimeZone

SimpleTimeZone
public class SimpleTimeZone extends TimeZone (Code)
SimpleTimeZone represents a local time zone and its daylight savings time rules for the gregorian calendar.
See Also:   Calendar
See Also:   TimeZone


Field Summary
final public static  intSTANDARD_TIME
    
final public static  intUTC_TIME
    
final public static  intWALL_TIME
    

Constructor Summary
public  SimpleTimeZone(int offset, String name)
     Constructs a new SimpleTimeZone using the specified offset for standard time from GMT and the specified time zone ID.
public  SimpleTimeZone(int offset, String name, int startMonth, int startDay, int startDayOfWeek, int startTime, int endMonth, int endDay, int endDayOfWeek, int endTime)
     Constructs a new SimpleTimeZone using the specified offset for standard time from GMT, the specified time zone ID and the rules for daylight savings time.
public  SimpleTimeZone(int offset, String name, int startMonth, int startDay, int startDayOfWeek, int startTime, int endMonth, int endDay, int endDayOfWeek, int endTime, int daylightSavings)
     Constructs a new SimpleTimeZone using the specified offset for standard time from GMT, the specified time zone ID and the rules for daylight savings time.
public  SimpleTimeZone(int offset, String name, int startMonth, int startDay, int startDayOfWeek, int startTime, int startTimeMode, int endMonth, int endDay, int endDayOfWeek, int endTime, int endTimeMode, int daylightSavings)
     Constructs a new SimpleTimeZone using the specified offset for standard time from GMT, the specified time zone ID, the rules for daylight savings time, and the modes indicating UTC, standard, or wall time.

Method Summary
public  Objectclone()
     Answers a new SimpleTimeZone with the same ID, rawOffset and daylight savings time rules as this SimpleTimeZone.
public  booleanequals(Object object)
     Compares the specified object to this SimpleTimeZone and answer if they are equal.
public  intgetDSTSavings()
     Gets the daylight savings offset in milliseconds for this SimpleTimeZone.
public  intgetOffset(int era, int year, int month, int day, int dayOfWeek, int time)
     Gets the offset from GMT of this SimpleTimeZone for the specified date and time.
public  intgetOffset(long time)
     Gets the offset from GMT of this SimpleTimeZone for the specified date.
public  intgetRawOffset()
     Gets the offset for standard time from GMT for this SimpleTimeZone.
public  booleanhasSameRules(TimeZone zone)
     Answers if the specified TimeZone has the same raw offset and daylight savings time rules as this SimpleTimeZone.
public synchronized  inthashCode()
     Answers an integer hash code for the receiver.
public  booleaninDaylightTime(Date time)
     Answers if the specified Date is in the daylight savings time period for this SimpleTimeZone.
public  voidsetDSTSavings(int milliseconds)
     Sets the daylight savings offset in milliseconds for this SimpleTimeZone.
public  voidsetEndRule(int month, int dayOfMonth, int time)
     Sets the rule which specifies the end of daylight savings time.
public  voidsetEndRule(int month, int day, int dayOfWeek, int time)
     Sets the rule which specifies the end of daylight savings time.
public  voidsetEndRule(int month, int day, int dayOfWeek, int time, boolean after)
     Sets the rule which specifies the end of daylight savings time.
public  voidsetRawOffset(int offset)
     Sets the offset for standard time from GMT for this SimpleTimeZone.
public  voidsetStartRule(int month, int dayOfMonth, int time)
     Sets the rule which specifies the start of daylight savings time.
public  voidsetStartRule(int month, int day, int dayOfWeek, int time)
     Sets the rule which specifies the start of daylight savings time.
public  voidsetStartRule(int month, int day, int dayOfWeek, int time, boolean after)
     Sets the rule which specifies the start of daylight savings time.
public  voidsetStartYear(int year)
     Sets the starting year for daylight savings time in this SimpleTimeZone.
public  StringtoString()
     Answers the string representation of this SimpleTimeZone.
public  booleanuseDaylightTime()
     Answers if this TimeZone has a daylight savings time period.

Field Detail
STANDARD_TIME
final public static int STANDARD_TIME(Code)



UTC_TIME
final public static int UTC_TIME(Code)



WALL_TIME
final public static int WALL_TIME(Code)




Constructor Detail
SimpleTimeZone
public SimpleTimeZone(int offset, String name)(Code)
Constructs a new SimpleTimeZone using the specified offset for standard time from GMT and the specified time zone ID.
Parameters:
  offset - the offset from GMT of standard time in milliseconds
Parameters:
  name - the time zone ID



SimpleTimeZone
public SimpleTimeZone(int offset, String name, int startMonth, int startDay, int startDayOfWeek, int startTime, int endMonth, int endDay, int endDayOfWeek, int endTime)(Code)
Constructs a new SimpleTimeZone using the specified offset for standard time from GMT, the specified time zone ID and the rules for daylight savings time.
Parameters:
  offset - the offset from GMT of standard time in milliseconds
Parameters:
  name - the time zone ID
Parameters:
  startMonth - the Calendar month in which daylight savings time starts
Parameters:
  startDay - the occurrence of the day of the week on which daylightsavings time starts
Parameters:
  startDayOfWeek - the Calendar day of the week on which daylight savings timestarts
Parameters:
  startTime - the time of day in milliseconds on which daylight savings timestarts
Parameters:
  endMonth - the Calendar month in which daylight savings time ends
Parameters:
  endDay - the occurrence of the day of the week on which daylightsavings time ends
Parameters:
  endDayOfWeek - the Calendar day of the week on which daylight savings timeends
Parameters:
  endTime - the time of day in milliseconds standard time on whichdaylight savings time ends



SimpleTimeZone
public SimpleTimeZone(int offset, String name, int startMonth, int startDay, int startDayOfWeek, int startTime, int endMonth, int endDay, int endDayOfWeek, int endTime, int daylightSavings)(Code)
Constructs a new SimpleTimeZone using the specified offset for standard time from GMT, the specified time zone ID and the rules for daylight savings time.
Parameters:
  offset - the offset from GMT of standard time in milliseconds
Parameters:
  name - the time zone ID
Parameters:
  startMonth - the Calendar month in which daylight savings time starts
Parameters:
  startDay - the occurrence of the day of the week on which daylightsavings time starts
Parameters:
  startDayOfWeek - the Calendar day of the week on which daylight savings timestarts
Parameters:
  startTime - the time of day in milliseconds on which daylight savings timestarts
Parameters:
  endMonth - the Calendar month in which daylight savings time ends
Parameters:
  endDay - the occurrence of the day of the week on which daylightsavings time ends
Parameters:
  endDayOfWeek - the Calendar day of the week on which daylight savings timeends
Parameters:
  endTime - the time of day in milliseconds standard time on whichdaylight savings time ends
Parameters:
  daylightSavings - the daylight savings time difference in milliseconds



SimpleTimeZone
public SimpleTimeZone(int offset, String name, int startMonth, int startDay, int startDayOfWeek, int startTime, int startTimeMode, int endMonth, int endDay, int endDayOfWeek, int endTime, int endTimeMode, int daylightSavings)(Code)
Constructs a new SimpleTimeZone using the specified offset for standard time from GMT, the specified time zone ID, the rules for daylight savings time, and the modes indicating UTC, standard, or wall time.
Parameters:
  offset - the offset from GMT of standard time in milliseconds
Parameters:
  name - the time zone ID
Parameters:
  startMonth - the Calendar month in which daylight savings time starts
Parameters:
  startDay - the occurrence of the day of the week on which daylightsavings time starts
Parameters:
  startDayOfWeek - the Calendar day of the week on which daylight savings timestarts
Parameters:
  startTime - the time of day in milliseconds on which daylight savings timestarts
Parameters:
  startTimeMode - the mode (UTC, standard, or wall time) of the start time value
Parameters:
  endMonth - the Calendar month in which daylight savings time ends
Parameters:
  endDay - the occurrence of the day of the week on which daylightsavings time ends
Parameters:
  endDayOfWeek - the Calendar day of the week on which daylight savings timeends
Parameters:
  endTime - the time of day in milliseconds standard time on whichdaylight savings time ends
Parameters:
  endTimeMode - the mode (UTC, standard, or wall time) of the end time value
Parameters:
  daylightSavings - the daylight savings time difference in milliseconds




Method Detail
clone
public Object clone()(Code)
Answers a new SimpleTimeZone with the same ID, rawOffset and daylight savings time rules as this SimpleTimeZone. a shallow copy of this SimpleTimeZone
See Also:   java.lang.Cloneable



equals
public boolean equals(Object object)(Code)
Compares the specified object to this SimpleTimeZone and answer if they are equal. The object must be an instance of SimpleTimeZone and have the same properties.
Parameters:
  object - the object to compare with this object true if the specified object is equal to this SimpleTimeZone,false otherwise
See Also:   SimpleTimeZone.hashCode



getDSTSavings
public int getDSTSavings()(Code)
Gets the daylight savings offset in milliseconds for this SimpleTimeZone. If this SimpleTimezone does not observe daylight savings, returns 0. the daylight savings offset in milliseconds



getOffset
public int getOffset(int era, int year, int month, int day, int dayOfWeek, int time)(Code)
Gets the offset from GMT of this SimpleTimeZone for the specified date and time. The offset includes daylight savings time if the specified date and time are within the daylight savings time period.
Parameters:
  era - the GregorianCalendar era, either GregorianCalendar.BC orGregorianCalendar.AD
Parameters:
  year - the year
Parameters:
  month - the Calendar month
Parameters:
  day - the day of the month
Parameters:
  dayOfWeek - the Calendar day of the week
Parameters:
  time - the time of day in milliseconds the offset from GMT in milliseconds



getOffset
public int getOffset(long time)(Code)
Gets the offset from GMT of this SimpleTimeZone for the specified date. The offset includes daylight savings time if the specified date is within the daylight savings time period.
Parameters:
  time - the date in milliseconds since January 1, 1970 00:00:00 GMT the offset from GMT in milliseconds



getRawOffset
public int getRawOffset()(Code)
Gets the offset for standard time from GMT for this SimpleTimeZone. the offset from GMT of standard time in milliseconds



hasSameRules
public boolean hasSameRules(TimeZone zone)(Code)
Answers if the specified TimeZone has the same raw offset and daylight savings time rules as this SimpleTimeZone.
Parameters:
  zone - a TimeZone true when the TimeZones have the same raw offset and daylightsavings time rules, false otherwise



hashCode
public synchronized int hashCode()(Code)
Answers an integer hash code for the receiver. Objects which are equal answer the same value for this method. the receiver's hash
See Also:   SimpleTimeZone.equals



inDaylightTime
public boolean inDaylightTime(Date time)(Code)
Answers if the specified Date is in the daylight savings time period for this SimpleTimeZone.
Parameters:
  time - a Date true when the Date is in the daylight savings time period, falseotherwise



setDSTSavings
public void setDSTSavings(int milliseconds)(Code)
Sets the daylight savings offset in milliseconds for this SimpleTimeZone.
Parameters:
  milliseconds - the daylight savings offset in milliseconds



setEndRule
public void setEndRule(int month, int dayOfMonth, int time)(Code)
Sets the rule which specifies the end of daylight savings time.
Parameters:
  month - the Calendar month in which daylight savings time ends
Parameters:
  dayOfMonth - the Calendar day of the month on which daylight savings timeends
Parameters:
  time - the time of day in milliseconds standard time on whichdaylight savings time ends



setEndRule
public void setEndRule(int month, int day, int dayOfWeek, int time)(Code)
Sets the rule which specifies the end of daylight savings time.
Parameters:
  month - the Calendar month in which daylight savings time ends
Parameters:
  day - the occurrence of the day of the week on which daylightsavings time ends
Parameters:
  dayOfWeek - the Calendar day of the week on which daylight savings timeends
Parameters:
  time - the time of day in milliseconds standard time on whichdaylight savings time ends



setEndRule
public void setEndRule(int month, int day, int dayOfWeek, int time, boolean after)(Code)
Sets the rule which specifies the end of daylight savings time.
Parameters:
  month - the Calendar month in which daylight savings time ends
Parameters:
  day - the Calendar day of the month
Parameters:
  dayOfWeek - the Calendar day of the week on which daylight savings timeends
Parameters:
  time - the time of day in milliseconds on which daylight savings timeends
Parameters:
  after - selects the day after or before the day of month



setRawOffset
public void setRawOffset(int offset)(Code)
Sets the offset for standard time from GMT for this SimpleTimeZone.
Parameters:
  offset - the offset from GMT of standard time in milliseconds



setStartRule
public void setStartRule(int month, int dayOfMonth, int time)(Code)
Sets the rule which specifies the start of daylight savings time.
Parameters:
  month - the Calendar month in which daylight savings time starts
Parameters:
  dayOfMonth - the Calendar day of the month on which daylight savings timestarts
Parameters:
  time - the time of day in milliseconds on which daylight savings timestarts



setStartRule
public void setStartRule(int month, int day, int dayOfWeek, int time)(Code)
Sets the rule which specifies the start of daylight savings time.
Parameters:
  month - the Calendar month in which daylight savings time starts
Parameters:
  day - the occurrence of the day of the week on which daylightsavings time starts
Parameters:
  dayOfWeek - the Calendar day of the week on which daylight savings timestarts
Parameters:
  time - the time of day in milliseconds on which daylight savings timestarts



setStartRule
public void setStartRule(int month, int day, int dayOfWeek, int time, boolean after)(Code)
Sets the rule which specifies the start of daylight savings time.
Parameters:
  month - the Calendar month in which daylight savings time starts
Parameters:
  day - the Calendar day of the month
Parameters:
  dayOfWeek - the Calendar day of the week on which daylight savings timestarts
Parameters:
  time - the time of day in milliseconds on which daylight savings timestarts
Parameters:
  after - selects the day after or before the day of month



setStartYear
public void setStartYear(int year)(Code)
Sets the starting year for daylight savings time in this SimpleTimeZone. Years before this start year will always be in standard time.
Parameters:
  year - the starting year



toString
public String toString()(Code)
Answers the string representation of this SimpleTimeZone. the string representation of this SimpleTimeZone



useDaylightTime
public boolean useDaylightTime()(Code)
Answers if this TimeZone has a daylight savings time period. true if this time zone has a daylight savings time period, falseotherwise



Fields inherited from java.util.TimeZone
static TimeZone GMT(Code)(Java Doc)
final public static int LONG(Code)(Java Doc)
final public static int SHORT(Code)(Java Doc)

Methods inherited from java.util.TimeZone
public Object clone()(Code)(Java Doc)
public static synchronized String[] getAvailableIDs()(Code)(Java Doc)
public static synchronized String[] getAvailableIDs(int offset)(Code)(Java Doc)
public int getDSTSavings()(Code)(Java Doc)
public static synchronized TimeZone getDefault()(Code)(Java Doc)
final public String getDisplayName()(Code)(Java Doc)
final public String getDisplayName(Locale locale)(Code)(Java Doc)
final public String getDisplayName(boolean daylightTime, int style)(Code)(Java Doc)
public String getDisplayName(boolean daylightTime, int style, Locale locale)(Code)(Java Doc)
public String getID()(Code)(Java Doc)
public int getOffset(long time)(Code)(Java Doc)
abstract public int getOffset(int era, int year, int month, int day, int dayOfWeek, int time)(Code)(Java Doc)
abstract public int getRawOffset()(Code)(Java Doc)
public static synchronized TimeZone getTimeZone(String name)(Code)(Java Doc)
public boolean hasSameRules(TimeZone zone)(Code)(Java Doc)
abstract public boolean inDaylightTime(Date time)(Code)(Java Doc)
public static synchronized void setDefault(TimeZone timezone)(Code)(Java Doc)
public void setID(String name)(Code)(Java Doc)
abstract public void setRawOffset(int offset)(Code)(Java Doc)
abstract public boolean useDaylightTime()(Code)(Java Doc)

Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final public Class<? extends Object> getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify()(Code)(Java Doc)
final public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait(long millis) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.