Here you can find the source of alignSecond(Calendar timestamp)
Parameter | Description |
---|---|
timestamp | The calendar to align. |
public static Calendar alignSecond(Calendar timestamp)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { /**//from ww w . j a v a 2 s . c o m * Aligns the time fields to the start of the second. * @param timestamp The calendar to align. * @return The parameter. */ public static Calendar alignSecond(Calendar timestamp) { timestamp.set(Calendar.MILLISECOND, 0); return timestamp; } }