Question: We have using three project code is same but package name is different and then API also different URL,we have using switch-case get package Name based, we want get that particular case URL and then call the URL in another class. can you help me 

```
public class AllChanges extends Application {

    public static Context context;
    public static String getPackageName() {
            return context.getPackageName();
    }

    public String url( ) {
        switch (getPackageName()){
            case "com.product.packagename1":
                Url  = "http://google.com";

            case "com.product.packagename2":
                Url  = "http://stackoverflow,com";

            case "com.product.packagename3":
                Url  = "http://facebook.com";

            case "com.product.packagename4":
                Url  = "http://bing.com";

            case "com.product.packagename5":
                Url  = "http://gmail.google.com";

        }

        return Url;
    }

    public static String Url = url();

}

```

Answer: 
Try `X` intead of `Z` in your format string.
I would make sure to always use the ISO8601.

As shazin stated you can replace your Z with X to perform the accepting of a Date.

As addition I would suggest to use the OffsetDateTime API like this:

```
OffsetDateTime time = OffsetDateTime.parse( YOUR_DATE_STRING );

```

this will give you an OffsetDateTime object you can work with to the correct time-zone. Also if you want to convert the input to your local time zone or the UTC timezone you can use

```
time.atZoneSameInstant( ZoneId.systemDefault() );

```