Java Timestamp isDST(Timestamp ts)

Here you can find the source of isDST(Timestamp ts)

Description

Whether we are in DST for a particular time in the servers default timezone.

License

Open Source License

Parameter

Parameter Description
ts Timestamp

Return

boolean True or False

Declaration

public static boolean isDST(Timestamp ts) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.sql.Timestamp;

import org.joda.time.DateTimeZone;

public class Main {
    /**//from  w w w. j a v a2s . co  m
     * Whether we are in DST for a particular time in the servers default timezone.
     * Mostly used by Matlab.
     * @param ts Timestamp
     * @return boolean True or False
     */
    public static boolean isDST(Timestamp ts) {
        return !DateTimeZone.getDefault().isStandardOffset(ts.getTime());
    }
}

Related

  1. hasTimeExpired(Timestamp referenceTime)
  2. inRange(Timestamp start, Timestamp end, boolean OnMonday, boolean OnTuesday, boolean OnWednesday, boolean OnThursday, boolean OnFriday, boolean OnSaturday, boolean OnSunday)
  3. internalToTimestamp(long v)
  4. isAllDay(Timestamp start, Timestamp end)
  5. isDifferentDay(final Timestamp ts1, final Timestamp ts2)
  6. isInPast(Timestamp timeStamp)
  7. isLongDate(Timestamp date)
  8. isLongTerm(Timestamp oldTime, Timestamp newTime)
  9. isSameDay(Timestamp one, Timestamp two)