You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by cb...@apache.org on 2007/01/05 17:48:10 UTC
svn commit: r493081 -
/velocity/tools/trunk/src/java/org/apache/velocity/tools/generic/DateTool.java
Author: cbrisson
Date: Fri Jan 5 08:48:09 2007
New Revision: 493081
URL: http://svn.apache.org/viewvc?view=rev&rev=493081
Log:
new method getSystemTime that allows .systemTime instead of .systemDate.time for the number of millisecs since January 1, 1970
Modified:
velocity/tools/trunk/src/java/org/apache/velocity/tools/generic/DateTool.java
Modified: velocity/tools/trunk/src/java/org/apache/velocity/tools/generic/DateTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/src/java/org/apache/velocity/tools/generic/DateTool.java?view=diff&rev=493081&r1=493080&r2=493081
==============================================================================
--- velocity/tools/trunk/src/java/org/apache/velocity/tools/generic/DateTool.java (original)
+++ velocity/tools/trunk/src/java/org/apache/velocity/tools/generic/DateTool.java Fri Jan 5 08:48:09 2007
@@ -110,6 +110,15 @@
// ------------------------- system date access ------------------
/**
+ * @return the system's current time as the number of milliseconds
+ * elapsed since January 1, 1970, 00:00:00 GMT.
+ */
+ public static final long getSystemTime()
+ {
+ return getSystemCalendar().getTime().getTime();
+ }
+
+ /**
* @return the system's current time as a {@link Date}
*/
public static final Date getSystemDate()