diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-11-23 09:04:16 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-11-23 17:26:29 +0100 |
commit | 7fb14c3d55ba19b85e7361577a92ee5a0f8ccefc (patch) | |
tree | 5cfe848ea35b532f0804b7db4fcc0b9c1e0be66e /sonar-plugin-api/src/main/java/org/sonar/api/utils/DateUtils.java | |
parent | fac2525b1ba5448bbfd2efdb672d708d889e993d (diff) | |
download | sonarqube-7fb14c3d55ba19b85e7361577a92ee5a0f8ccefc.tar.gz sonarqube-7fb14c3d55ba19b85e7361577a92ee5a0f8ccefc.zip |
SONAR-7039 Generate user tokens
Diffstat (limited to 'sonar-plugin-api/src/main/java/org/sonar/api/utils/DateUtils.java')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/utils/DateUtils.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/DateUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/DateUtils.java index 9abeb23dca3..d214f8d72ee 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/DateUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/DateUtils.java @@ -56,6 +56,10 @@ public final class DateUtils { return THREAD_SAFE_DATETIME_FORMAT.format(d); } + public static String formatDateTime(long ms) { + return THREAD_SAFE_DATETIME_FORMAT.format(new Date(ms)); + } + public static String formatDateTimeNullSafe(@Nullable Date date) { return date == null ? "" : THREAD_SAFE_DATETIME_FORMAT.format(date); } |