Skip to content

Commit e24269a

Browse files
committed
Fixed date issue
1 parent 8e4e630 commit e24269a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/ldbc/socialnet/dbgen/generator/DateGenerator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ public static String formatDate(GregorianCalendar c)
113113

114114
c.setTimeZone(TimeZone.getTimeZone("GMT"));
115115
SimpleDateFormat gmtDateFormatter = new SimpleDateFormat("yyyy-MM-dd");
116+
gmtDateFormatter.setTimeZone(TimeZone.getTimeZone("GMT"));
116117
return gmtDateFormatter.format(c.getTime());
117118
}
118119

@@ -161,6 +162,7 @@ public static String formatDateDetail(GregorianCalendar c)
161162
*/
162163
c.setTimeZone(TimeZone.getTimeZone("GMT"));
163164
SimpleDateFormat gmtDateFormatter = new SimpleDateFormat("yyyy-MM-ddHH:mm:ssZ");
165+
gmtDateFormatter.setTimeZone(TimeZone.getTimeZone("GMT"));
164166
return gmtDateFormatter.format(c.getTime());
165167
}
166168

0 commit comments

Comments
 (0)