Skip to content

oracle-xe:21-slim-faststart - can I set timezone? #209

Answered by gvenzl
hungalabunga asked this question in Q&A
Discussion options

You must be logged in to vote

Hey Greg,

Docker containers always run in UTC but you can set it simply by passing on the TZ environment variable, for example:

podman run --name test -p 1521:1521 -e TZ="Europe/Vienna" -e ORACLE_RANDOM_PASSWORD=y gvenzl/oracle-xe:21-slim-faststart

This will make the container run in the Central European Time Zone:

[gvenzl@localhost ~]$ podman exec -ti test bash
bash-4.4$ echo $TZ
Europe/Vienna
bash-4.4$ date
Sat Jun 10 21:31:37 CEST 2023

Note the CEST timezone above.

bash-4.4$ sqlplus / as sysdba

SQL*Plus: Release 21.0.0.0.0 - Production on Sat Jun 10 21:31:51 2023
Version 21.3.0.0.0

Copyright (c) 1982, 2021, Oracle.  All rights reserved.


Connected to:
Oracle Database 21c Express Ed…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gvenzl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants