This is an automated email from the ASF dual-hosted git repository.

pingsutw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git


The following commit(s) were added to refs/heads/master by this push:
     new 02ebe9eb SUBMARINE-1354. Fix submarine-server timezone display and 
calculation error
02ebe9eb is described below

commit 02ebe9ebf93ea52a91cc7910b2cf1b09a1843df1
Author: cdmikechen <[email protected]>
AuthorDate: Sat Dec 3 14:00:24 2022 +0800

    SUBMARINE-1354. Fix submarine-server timezone display and calculation error
    
    ### What is this PR for?
    The default JDBC configuration of the docker image based on 
submarine-site.xml is wrong, resulting in time zone problems when performing 
duration calculations in experiment (e.g. 8 hours more in East 8)
    
    ### What type of PR is it?
    Bug Fix
    
    ### Todos
    * [x] - Add timezone params in JDBC url in submarine-site.xml
    * [x] - Remove timezone in dockerfile
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/SUBMARINE-1354
    
    ### How should this be tested?
    NA
    
    ### Screenshots (if appropriate)
    
    ### Questions:
    * Do the license files need updating? No
    * Are there breaking changes for older versions? No
    * Does this need new documentation? No
    
    Author: cdmikechen <[email protected]>
    
    Signed-off-by: Kevin <[email protected]>
    
    Closes #1024 from cdmikechen/SUBMARINE-1354 and squashes the following 
commits:
    
    66ab43a9 [cdmikechen] Fix submarine-server timezone display
---
 conf/submarine-site.xml                        | 2 +-
 dev-support/docker-images/submarine/Dockerfile | 5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/conf/submarine-site.xml b/conf/submarine-site.xml
index d26262ed..883d0c61 100755
--- a/conf/submarine-site.xml
+++ b/conf/submarine-site.xml
@@ -113,7 +113,7 @@
   </property>
   <property>
     <name>jdbc.url</name>
-    
<value>jdbc:mysql://127.0.0.1:3306/submarine?useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true&amp;failOverReadOnly=false&amp;zeroDateTimeBehavior=convertToNull&amp;useSSL=false&amp;allowMultiQueries=true</value>
+    
<value>jdbc:mysql://127.0.0.1:3306/submarine?useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true&amp;failOverReadOnly=false&amp;zeroDateTimeBehavior=convertToNull&amp;useSSL=false&amp;allowMultiQueries=true&amp;serverTimezone=UTC&amp;useTimezone=true&amp;useLegacyDatetimeCode=true</value>
   </property>
   <property>
     <name>jdbc.username</name>
diff --git a/dev-support/docker-images/submarine/Dockerfile 
b/dev-support/docker-images/submarine/Dockerfile
index eb77fa77..ca76d318 100644
--- a/dev-support/docker-images/submarine/Dockerfile
+++ b/dev-support/docker-images/submarine/Dockerfile
@@ -23,10 +23,7 @@ MAINTAINER Apache Software Foundation 
<[email protected]>
 
 # INSTALL openjdk
 RUN apk update && \
-    apk add --no-cache openjdk8 tzdata bash tini&& \
-    cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
-    echo Asia/Shanghai > /etc/timezone && \
-    apk del tzdata && \
+    apk add --no-cache openjdk8 bash tini && \
     rm -rf /tmp/* /var/cache/apk/*
 
 ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk/jre


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to