Skip to content

Commit

Permalink
fix: zds datetime from non-utc source defaults to zulu (#100)
Browse files Browse the repository at this point in the history
* fix: zds datetime from non-utc source defaults to zulu

* chore(helm): add zds timezone configuration

* chore(helm): bump chart 0.7.7 with app 1.12.8
  • Loading branch information
MLenterman authored May 26, 2023
1 parent 35b8e74 commit 6e2a7f0
Show file tree
Hide file tree
Showing 8 changed files with 127 additions and 116 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM nexus.frankframework.org/frank-framework:7.9-SNAPSHOT
# TempFix TODO: Move this to the credentialprovider.properties
ENV credentialFactory.class=nl.nn.credentialprovider.PropertyFileCredentialFactory
ENV credentialFactory.map.properties=/opt/frank/resources/credentials.properties
ENV zaakbrug.zds.timezone=UTC

# Copy dependencies
COPY --chown=tomcat lib/server/ /usr/local/tomcat/lib/
Expand Down
4 changes: 2 additions & 2 deletions charts/zaakbrug/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v2
appVersion: 1.12.7
appVersion: 1.12.8
description: Install ZaakBrug (zds-to-zgw) on Haven, powerd by the Frank!Framework
name: zaakbrug
type: application
version: 0.7.6
version: 0.7.7

home: https://github.com/ibissource/zaakbrug
icon: "https://raw.githubusercontent.com/ibissource/zaakbrug/master/zaakbrug-icon.png"
Expand Down
1 change: 1 addition & 0 deletions charts/zaakbrug/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ data:
application.server.type.custom: NARAYANA
JAVA_OPTS: -Xmx{{ .Values.frank.memory }} -Xms{{ .Values.frank.memory }}
TZ: {{ .Values.timeZone }}
zaakbrug.zds.timezone: {{ .Values.zaakbrug.zds.timezone | default UTC }}
{{- $name := .Values.frank.instance.name | required (printf ".frank.instance.name is a required parameter") }}
instance.name: {{ .Values.frank.instance.name }}
{{- $name := .Values.frank.dtap.stage | required (printf ".frank.dtap.stage is a required parameter") }}
Expand Down
2 changes: 2 additions & 0 deletions charts/zaakbrug/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ affinity: {}
timeZone: Etc/UTC

zaakbrug:
zds:
timezone: UTC
soap:
beantwoordVraag:
endpoint: "translate/generic/zds/BeantwoordVraag"
Expand Down
5 changes: 5 additions & 0 deletions docker-compose.zaakbrug.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ services:
build: .
image: wearefrank/zaakbrug:latest
container_name: zaakbrug
environment:
- zaakbrug.zds.timezone=UTC
- TZ=Europe/Amsterdam
volumes: &zaakbrug-database-data
- ../frank-runner/data:/usr/local/tomcat/data
- logs:/usr/local/tomcat/logs
# - ./data:/usr/local/tomcat/data
networks:
- zaakbrug
Expand All @@ -27,6 +31,7 @@ services:
- 8080:8080

volumes:
logs:
database-data:
media:
private-media:
Expand Down
224 changes: 112 additions & 112 deletions e2e/SoapUI/zaakbrug-e2e-soapui-project.xml

Large diffs are not rendered by default.

Binary file modified e2e/SoapUI/zaakbrug-e2e-soapui-project.xml.zip
Binary file not shown.
6 changes: 4 additions & 2 deletions src/main/configurations/Translate/Zgw/ZgwFunctionsBase.xslt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<xsl:stylesheet exclude-result-prefixes="xs xsl zgw" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:zgw="http://google.com/zgw" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" >
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="yes" exclude-result-prefixes="xsi"/>

<xsl:function name="zgw:toZgwDatetime" as="xs:dateTime">
<xsl:param name="dateTimeStr" as="xs:string"/>
<xsl:value-of select="concat(substring($dateTimeStr,1,4), '-', substring($dateTimeStr,5,2), '-', substring($dateTimeStr,7,2), 'T', substring($dateTimeStr,9,2), ':', substring($dateTimeStr,11,2), ':', substring($dateTimeStr,13,2), 'Z')"/>
<xsl:variable name="withoutZulu" select="xs:dateTime(concat(substring($dateTimeStr,1,4), '-', substring($dateTimeStr,5,2), '-', substring($dateTimeStr,7,2), 'T', substring($dateTimeStr,9,2), ':', substring($dateTimeStr,11,2), ':', substring($dateTimeStr,13,2)))" />
<xsl:variable name="withZulu" select="xs:dateTime(concat($withoutZulu, 'Z'))" />
<xsl:variable name="timezoneOffset" select="format-dateTime($withZulu, '[Z]', (), (), environment-variable('zaakbrug.zds.timezone'))" />
<xsl:value-of select="concat($withoutZulu, $timezoneOffset)"/>
</xsl:function>

<xsl:function name="zgw:toZgwDate">
Expand Down

0 comments on commit 6e2a7f0

Please sign in to comment.