Skip to content

Commit

Permalink
add date format 'yyyy-MM-dd'
Browse files Browse the repository at this point in the history
  • Loading branch information
baisui1981 committed Nov 9, 2024
1 parent 8d0308b commit cbe474c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
**/
public enum TimeFormat {
yyyyMMddHHmmss(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")), yyyyMMdd(DateTimeFormatter.ofPattern("yyyyMMdd"));

public static final String DATA_FORMAT = "yyyy-MM-dd";
public static final ZoneId sysZoneId = ZoneOffset.systemDefault();
public final DateTimeFormatter timeFormatter;
public static Long timestampForTest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qlangtech.tis.manage.common;

import com.qlangtech.tis.datax.TimeFormat;
import com.qlangtech.tis.pubhook.common.Nullable;
import com.qlangtech.tis.pubhook.common.RunEnvironment;
import com.qlangtech.tis.realtime.utils.NetUtils;
Expand Down Expand Up @@ -51,7 +52,7 @@ public class ManageUtils {

private static final SimpleDateFormat TIME_FORMAT = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");

private static final SimpleDateFormat TIME_FORMAT2 = new SimpleDateFormat("yyyy-MM-dd");
public static final SimpleDateFormat TIME_FORMAT2 = new SimpleDateFormat(TimeFormat.DATA_FORMAT);

public static final ThreadLocal<SimpleDateFormat> dateFormatyyyyMMddHHmmss = new ThreadLocal<SimpleDateFormat>() {

Expand Down

0 comments on commit cbe474c

Please sign in to comment.