Subversion Repository Public Repository

litesoft

Diff Revisions 851 vs 858 for /trunk/Java/core/Anywhere/src/org/litesoft/core/typeutils/Timestamps.java

Diff revisions: vs.
  @@ -1,13 +1,22 @@
1 1 package org.litesoft.core.typeutils;
2 2
3 3 import java.sql.*;
4 -
5 - import org.litesoft.core.typeutils.gregorian.*;
4 + import java.text.*;
6 5
7 6 public class Timestamps
8 7 {
9 8 public static Timestamp now()
10 9 {
11 - return new Timestamp( Dates.now().getTime() );
10 + return new Timestamp( System.currentTimeMillis() );
11 + }
12 +
13 + public static String nowToYMDHMS4FileName()
14 + {
15 + return new SimpleDateFormat( "yyyyMMdd-HHmmss" ).format( now() );
16 + }
17 +
18 + public static String nowToYMDHMS()
19 + {
20 + return new SimpleDateFormat( "yyyy/MM/dd HH:mm:ss" ).format( now() );
12 21 }
13 22 }