| | |
| | | */ |
| | | package org.forgerock.opendj.ldap; |
| | | |
| | | import java.time.ZoneId; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.GregorianCalendar; |
| | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.util.Reject; |
| | | |
| | | |
| | | import static com.forgerock.opendj.ldap.CoreMessages.*; |
| | | |
| | | /** |
| | |
| | | |
| | | // If we've gotten here, then it looks like a valid offset. We can |
| | | // create a time zone by using "GMT" followed by the offset. |
| | | return TimeZone.getTimeZone("GMT" + offSetStr); |
| | | try { |
| | | return TimeZone.getTimeZone(ZoneId.of("GMT"+offSetStr)); |
| | | }catch (java.time.DateTimeException e) { |
| | | return TimeZone.getTimeZone("GMT"+offSetStr); |
| | | } |
| | | } |
| | | |
| | | /** Lazily constructed internal representations. */ |