2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2016-2018 Ericsson. All rights reserved.
4 * Modifications Copyright (C) 2019-2020 Nordix Foundation.
5 * ================================================================================
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 * SPDX-License-Identifier: Apache-2.0
19 * ============LICENSE_END=========================================================
22 package org.onap.policy.apex.context.test.concepts;
24 import java.io.Serializable;
25 import java.util.TimeZone;
29 * The Class TestContextDateTzItem.
32 public class TestContextDateTzItem implements Serializable {
33 private static final long serialVersionUID = 5604426823170331706L;
35 private TestContextDateItem dateValue = new TestContextDateItem(System.currentTimeMillis());
36 private String tzValue = TimeZone.getTimeZone("Europe/Dublin").getDisplayName();
37 private boolean dst = false;
42 public TestContextDateTzItem() {
49 * @param dateValue the date value
50 * @param tzValue the tz value
53 public TestContextDateTzItem(final TestContextDateItem dateValue, final String tzValue, final boolean dst) {
54 this.dateValue = dateValue;
55 this.tzValue = TimeZone.getTimeZone(tzValue).getDisplayName();
62 * @param original the original
64 public TestContextDateTzItem(final TestContextDateTzItem original) {
65 this.dateValue = original.dateValue;
66 this.tzValue = original.tzValue;
67 this.dst = original.dst;
73 * @param tzValue the TZ value
75 public void setTzValue(final String tzValue) {
76 if (tzValue != null) {
77 this.tzValue = TimeZone.getTimeZone(tzValue).getDisplayName();