Created
October 30, 2013 14:45
-
-
Save inferjay/7233861 to your computer and use it in GitHub Desktop.
获取北京时区当天开始时间的毫秒值
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static long getTodayStartTime(){ | |
Calendar todayStart = Calendar.getInstance(new SimpleTimeZone(0, "Asia/Beijing")); | |
todayStart.set(Calendar.HOUR, 0); | |
todayStart.set(Calendar.MINUTE, 0); | |
todayStart.set(Calendar.SECOND, 0); | |
todayStart.set(Calendar.MILLISECOND, 0); | |
Date today = (Date) todayStart.getTime().clone(); | |
return today.getTime(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment