Class DateUtil
java.lang.Object
com.atlassian.jira.functest.framework.util.date.DateUtil
Some utility methods for manipulating dates in functional tests.
This is often required to make sure that func tests run okay when executed in different time zones.
- Since:
- v4.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdateAsMillis(int year, int month, int day, int hour, int minute) Returns a string representing the given date in milliseconds, for example123456789.static StringdateAsTimestamp(int year, int month, int day, int hour, int minute) Returns a string representing the given date in the format suitable for timestamp fields in the data XML file, for example2008-06-02 09:43:58.788.
-
Constructor Details
-
DateUtil
public DateUtil()
-
-
Method Details
-
dateAsTimestamp
Returns a string representing the given date in the format suitable for timestamp fields in the data XML file, for example
2008-06-02 09:43:58.788.- Parameters:
year- yearmonth- monthday- dayhour- hourminute- minute- Returns:
- String timestamp representation
-
dateAsMillis
Returns a string representing the given date in milliseconds, for example
123456789.- Parameters:
year- yearmonth- monthday- dayhour- hourminute- minute- Returns:
- String millisecond representation
-