public class DateUtil extends Object
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.
Constructor and Description |
---|
DateUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
dateAsMillis(int year,
int month,
int day,
int hour,
int minute)
Returns a string representing the given date in milliseconds, for example
123456789 . |
static String |
dateAsTimestamp(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 example
2008-06-02 09:43:58.788 . |
public static String dateAsTimestamp(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 example 2008-06-02 09:43:58.788
.
year
- yearmonth
- monthday
- dayhour
- hourminute
- minutepublic static String dateAsMillis(int year, int month, int day, int hour, int minute)
Returns a string representing the given date in milliseconds, for example 123456789
.
year
- yearmonth
- monthday
- dayhour
- hourminute
- minuteCopyright © 2002-2019 Atlassian. All Rights Reserved.