File tree Expand file tree Collapse file tree
src/main/java/com/kosherjava/zmanim/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -277,27 +277,21 @@ public String format(Time time) {
277277 * the {@link java.time.ZoneId ZoneId} used to help format based on the <code>Instant</code>'s DST and other
278278 * settings.
279279 * @return the formatted String
280+ * @see #getXSDateTime(Instant)
280281 */
281282 public String formatDateTime (Instant instant , ZoneId zoneId ) {
282283 ZonedDateTime dateTime = instant .atZone (zoneId );
283-
284- if (this .dateTimeFormatter .toString ().equals ("yyyy-MM-dd'T'HH:mm:ss" )) { // FIXME this works in the SimpleDateFormat but not with a DateTimeFormatter
285- return getXSDateTime (instant );
286- } else {
287- return this .dateTimeFormatter .format (dateTime );
288- }
284+ return this .getDateTimeFormatter ().format (dateTime );
289285 }
290286
291287 /**
292288 * Format the <code>Instant</code> using the format "yyyy-MM-dd'T'HH:mm:ssXXX".
293289 * @param instant the <code>Instant</code> to format.
294290 * @return the <code>Instant</code> formatted using the format "yyyy-MM-dd'T'HH:mm:ssXXX
295291 */
296- public String getXSDateTime (Instant instant ) {
297- DateTimeFormatter formatter =
298- DateTimeFormatter .ofPattern ("yyyy-MM-dd'T'HH:mm:ssXXX" )
299- .withZone (getZoneId ());
300-
292+ public String formatXSDateTime (Instant instant ) {
293+ DateTimeFormatter formatter = DateTimeFormatter .ofPattern ("yyyy-MM-dd'T'HH:mm:ssXXX" )
294+ .withZone (getZoneId ());
301295 return formatter .format (instant );
302296 }
303297
You can’t perform that action at this time.
0 commit comments