summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/kbackupfabric/backup/BackupNameTimeFormatter.java
blob: 39abc75d3f1c5612576fa22b7433c7d0b9a29649 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.keuin.kbackupfabric.backup;

import com.keuin.kbackupfabric.util.DateUtil;

import java.time.LocalDateTime;

public class BackupNameTimeFormatter {

    @Deprecated
    public static String getTimeString() {
        return DateUtil.getString(LocalDateTime.now());
    }

    public static String localDateTimeToString(LocalDateTime localDateTime) {
        return DateUtil.getString(localDateTime);
    }

    @Deprecated
    public static long timeStringToEpochSeconds(String timeString) {
        return DateUtil.toEpochSecond(timeString);
    }

}