Package net.easymodo.asagi

Source Code of net.easymodo.asagi.DateUtils

package net.easymodo.asagi;


import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;

public class DateUtils {
    public static final DateTimeZone NYC_TIMEZONE = DateTimeZone.forID("America/New_York");

    public static long adjustTimestampEpoch(long dateUtc, DateTimeZone dateTimeZone) {
        DateTime dtDate = new DateTime(dateUtc * 1000L);
        DateTime dtEst = dtDate.withZone(dateTimeZone);
        return (dtEst.withZoneRetainFields(DateTimeZone.UTC).getMillis() / 1000);
    }
}
TOP

Related Classes of net.easymodo.asagi.DateUtils

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.