List of usage examples for org.joda.time DateTimeZone forID
@FromString public static DateTimeZone forID(String id)
From source file:com.payintech.smoney.entity.CardEntity.java
License:Open Source License
/** * Get the card expiry date on a specific timezone. * * @param timeZone The timezone to use// w ww . j a va2s . c om * @return The datetime converted to the specific timezone * @since 16.01 */ public DateTime getExpiryDate(final String timeZone) { if (this.ExpiryDate == null) { return null; } return this.ExpiryDate.toDateTime(DateTimeZone.forID(timeZone)); }
From source file:com.payintech.smoney.entity.HistoryItemEntity.java
License:Open Source License
/** * Get the operation date on a specific timezone. * * @param timeZone The timezone to use/*from w w w.ja va2 s . c o m*/ * @return The datetime converted to the specific timezone * @since 15.12 */ public DateTime getOperationDate(final String timeZone) { return this.OperationDate.toDateTime(DateTimeZone.forID(timeZone)); }
From source file:com.payintech.smoney.entity.KycEntity.java
License:Open Source License
/** * Get the request date on a specific timezone. * * @param timeZone The timezone to use/*from w ww.jav a2 s . com*/ * @return The datetime converted to the specific timezone * @since 15.12 */ public DateTime getRequestDate(final String timeZone) { return this.RequestDate.toDateTime(DateTimeZone.forID(timeZone)); }
From source file:com.payintech.smoney.entity.PaymentScheduleEntity.java
License:Open Source License
/** * Get the date on a specific timezone./* w w w . j a v a 2s . c o m*/ * * @param timeZone The timezone to use * @return The datetime converted to the specific timezone * @since 15.12 */ public DateTime getDate(final String timeZone) { return this.Date.toDateTime(DateTimeZone.forID(timeZone)); }
From source file:com.payintech.smoney.entity.ProfileEntity.java
License:Open Source License
/** * Get the birthdate date on a specific timezone. * * @param timeZone The timezone to use//w w w. ja va2 s . c om * @return The datetime converted to the specific timezone * @since 15.12 */ public DateTime getBirthdate(final String timeZone) { if (this.Birthdate != null) { return this.Birthdate.toDateTime(DateTimeZone.forID(timeZone)); } return null; }
From source file:com.payintech.smoney.entity.SubAccountEntity.java
License:Open Source License
/** * Get the creation date on a specific timezone. * * @param timeZone The timezone to use/*w ww. j a v a 2s . c o m*/ * @return The datetime converted to the specific timezone * @since 15.12 */ public DateTime getCreationDate(final String timeZone) { return this.CreationDate.toDateTime(DateTimeZone.forID(timeZone)); }
From source file:com.phloc.datetime.config.PDTConfig.java
License:Apache License
/** * Set the default date time zone to use. * * @param sDateTimeZoneID/*from w ww .j av a 2 s .c om*/ * Must be a valid, non-null time zone. * @return {@link ESuccess} */ @Nonnull public static ESuccess setDefaultDateTimeZoneID(final String sDateTimeZoneID) { s_aRWLock.writeLock().lock(); try { // Try to resolve ID -> throws IAE if unknown s_aDateTimeZone = DateTimeZone.forID(sDateTimeZoneID); return ESuccess.SUCCESS; } catch (final IllegalArgumentException ex) { // time zone ID is unknown s_aLogger.warn("Unsupported dateTimeZone ID '" + sDateTimeZoneID + "'"); return ESuccess.FAILURE; } finally { s_aRWLock.writeLock().unlock(); } }
From source file:com.salesmanBuddy.dao.JDBCSalesmanBuddyDAO.java
License:Open Source License
private String generateEmailContentForDealershipIdReportType(Integer dealershipId, Integer type) { DateTime now = new DateTime(DateTimeZone.forID("America/Denver")); final Integer BACK_MINUTES = 10; DateTime dayPrevious = now.minusDays(1).minusMinutes(BACK_MINUTES); DateTime weekPrevious = now.minusWeeks(1).minusMinutes(BACK_MINUTES); DateTime monthPrevious = now.minusMonths(1).minusMinutes(BACK_MINUTES); switch (type) { case DAILY_TEST_DRIVE_SUMMARY_EMAIL_TYPE: return this.testDriveSummaryReport(dealershipId, dayPrevious, now); case DAILY_ALL_SALESMAN_SUMMARY_EMAIL_TYPE: return this.allSalesmanSummaryReport(dealershipId, dayPrevious, now); case DAILY_DEALERSHIP_SUMMARY_EMAIL_TYPE: return this.dealershipSummaryReport(dealershipId, dayPrevious, now); case DAILY_STOCK_NUMBERS_EMAIL_TYPE: return this.stockNumberSummaryReport(dealershipId, dayPrevious, now); case WEEKLY_TEST_DRIVE_SUMMARY_EMAIL_TYPE: return this.testDriveSummaryReport(dealershipId, weekPrevious, now); case WEEKLY_ALL_SALESMAN_SUMMARY_EMAIL_TYPE: return this.allSalesmanSummaryReport(dealershipId, weekPrevious, now); case WEEKLY_DEALERSHIP_SUMMARY_EMAIL_TYPE: return this.dealershipSummaryReport(dealershipId, weekPrevious, now); case WEEKLY_STOCK_NUMBERS_EMAIL_TYPE: return this.stockNumberSummaryReport(dealershipId, weekPrevious, now); case MONTHLY_TEST_DRIVE_SUMMARY_EMAIL_TYPE: return this.testDriveSummaryReport(dealershipId, monthPrevious, now); case MONTHLY_ALL_SALESMAN_SUMMARY_EMAIL_TYPE: return this.allSalesmanSummaryReport(dealershipId, monthPrevious, now); case MONTHLY_DEALERSHIP_SUMMARY_EMAIL_TYPE: return this.dealershipSummaryReport(dealershipId, monthPrevious, now); case MONTHLY_STOCK_NUMBERS_EMAIL_TYPE: return this.stockNumberSummaryReport(dealershipId, monthPrevious, now); // case DAILY_SALESMAN_SUMMARY_EMAIL_TYPE: // //from w w w . jav a 2 s .co m // break; // // case WEEKLY_SALESMAN_SUMMARY_EMAIL_TYPE: // // break; // // case MONTHLY_SALESMAN_SUMMARY_EMAIL_TYPE: // // break; default: return "Error, couldn't find correct report type"; } }
From source file:com.sandata.lab.common.utils.date.DateUtil.java
License:Open Source License
public static Date convertUTCToTargetTimeZone(Date date, String timezoneName) { return new LocalDateTime(date.getTime()).toDateTime(DateTimeZone.UTC) .toDateTime(DateTimeZone.forID(timezoneName)).toLocalDateTime().toDate(); }
From source file:com.sandata.lab.common.utils.date.DateUtil.java
License:Open Source License
public static Date convertFromTimeZoneToUTC(Date date, String timezoneName) { return new LocalDateTime(date.getTime()).toDateTime(DateTimeZone.forID(timezoneName)) .toDateTime(DateTimeZone.UTC).toLocalDateTime().toDate(); }