Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.mysql.jdbc
Class TimeUtil  view TimeUtil download TimeUtil.java

java.lang.Object
  extended bycom.mysql.jdbc.TimeUtil

public class TimeUtil
extends java.lang.Object

Timezone conversion routines


Field Summary
(package private) static java.util.Map ABBREVIATED_TIMEZONES
           
(package private) static java.util.TimeZone GMT_TIMEZONE
           
(package private) static java.util.Map TIMEZONE_MAPPINGS
           
 
Constructor Summary
TimeUtil()
           
 
Method Summary
static java.sql.Timestamp changeTimezone(Connection conn, java.sql.Timestamp tstamp, java.util.TimeZone fromTz, java.util.TimeZone toTz)
          Change the given timestamp from one timezone to another
static java.sql.Time changeTimezone(Connection conn, java.sql.Time t, java.util.TimeZone fromTz, java.util.TimeZone toTz)
          Change the given times from one timezone to another
static java.lang.String getCanoncialTimezone(java.lang.String timezoneStr)
          Returns the 'official' Java timezone name for the given timezone
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GMT_TIMEZONE

static final java.util.TimeZone GMT_TIMEZONE

TIMEZONE_MAPPINGS

static final java.util.Map TIMEZONE_MAPPINGS

ABBREVIATED_TIMEZONES

static final java.util.Map ABBREVIATED_TIMEZONES
Constructor Detail

TimeUtil

public TimeUtil()
Method Detail

getCanoncialTimezone

public static java.lang.String getCanoncialTimezone(java.lang.String timezoneStr)
Returns the 'official' Java timezone name for the given timezone


changeTimezone

public static java.sql.Timestamp changeTimezone(Connection conn,
                                                java.sql.Timestamp tstamp,
                                                java.util.TimeZone fromTz,
                                                java.util.TimeZone toTz)
Change the given timestamp from one timezone to another


changeTimezone

public static java.sql.Time changeTimezone(Connection conn,
                                           java.sql.Time t,
                                           java.util.TimeZone fromTz,
                                           java.util.TimeZone toTz)
Change the given times from one timezone to another