Java Timestamp minusOneSecond(Timestamp now)

Here you can find the source of minusOneSecond(Timestamp now)

Description

minus One Second

License

Open Source License

Declaration

public static Timestamp minusOneSecond(Timestamp now) 

Method Source Code

//package com.java2s;
/**//  w w  w .j av a2s .  c o m
 * Copyright (c) 2015 SK holdings Co., Ltd. All rights reserved.
 * This software is the confidential and proprietary information of SK holdings.
 * You shall not disclose such confidential information and shall use it only in
 * accordance with the terms of the license agreement you entered into with SK holdings.
 * (http://www.eclipse.org/legal/epl-v10.html)
 */

import java.sql.Timestamp;

public class Main {

    public static Timestamp minusOneSecond(Timestamp now) {
        return new Timestamp(now.getTime() - 1000);
    }
}

Related

  1. long2Timestamp(Long longValue)
  2. longFromTimestamp(Timestamp ts)
  3. max(Timestamp ts1, Timestamp ts2)
  4. maxTime(Timestamp dayTime)
  5. minusHours(Timestamp ts, int hours)
  6. newDate(Timestamp time)
  7. newTimestamp()
  8. newTimestamp(Date date)
  9. normalizeDateTimeAsTimestamp(Date changedDate, Locale locale)