Skip to content

Commit d4063ac

Browse files
fix(build): update datetime and fix build (#490)
Signed-off-by: Goetz Goerisch <g.goerisch@vdw.de>
1 parent 747fd02 commit d4063ac

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.forgejo/workflows/build_containers.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ jobs:
4545
type=ref,event=branch
4646
type=ref,event=tag
4747
type=ref,event=pr
48-
type=sha,prefix=sha-,format=short
4948
- name: Build and push
5049
uses: docker/build-push-action@v6.18.0
5150
with:

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ FROM python:3.13-trixie
22
LABEL org.opencontainers.image.source=https://github.com/umati/Sample-Server-asyncio
33

44
RUN apt update && \
5-
apt install -yy build-essential \
5+
apt install -yy --no-install-recommends --no-install-suggests \
6+
build-essential \
67
python3-dev \
78
libssl-dev \
89
libffi-dev \

src/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import logging
1515
import time
1616
import random
17-
from datetime import datetime
17+
from datetime import datetime, timezone
1818
from asyncua import Server, ua
1919
from asyncua.common.ua_utils import value_to_datavalue
2020
from asyncua.common.instantiate_util import instantiate
@@ -174,7 +174,7 @@ async def main():
174174
Value=dv.Value,
175175
StatusCode_=dv.StatusCode_,
176176
SourceTimestamp=dv.SourceTimestamp,
177-
ServerTimestamp=datetime.now(datetime.UTC)
177+
ServerTimestamp=datetime.now(timezone.utc)
178178
)
179179
await server.write_attribute_value(item[0][0].nodeid, new_dv, ua.AttributeIds.Value)
180180

0 commit comments

Comments
 (0)