__bionic_open_tzdata_path: ANDROID_DATA not set! When running commands like date or ls -l I always get a multiple repetition of the following lines to the standard error:

__bionic_open_tzdata_path: ANDROID_DATA not set!
__bionic_open_tzdata_path: ANDROID_ROOT not set!


I used to consider it acceptable, until I created a script running date in a loop, causing an awful endless stream of the same repeated lines.
I couldn't find any documentation about it, yet the problem seems to be common.
Any idea how to fix this?
Thanks in advance
For ssh users, following up on @Death Mask Salesman's comment. sshd allows setting up ENV via proper config (from man --pager='less -p ^ENVIRONMENT' ssh):


  [...] Additionally, ssh reads ~/.ssh/environment, and adds lines of the format “VARNAME=value” to the environment if the
       file exists and users are allowed to change their environment.  For more information, see the PermitUserEnvironment
       option in sshd_config(5).


However I couldn't succeed to set it up on my phone (Sony Xperia "Tsubasa" / LineageOS 14.1). Thus I resorted to adding in /etc/bash/bashrc:

export ANDROID_DATA=/data ANDROID_ROOT=/system


then logging in...

$ ssh root@... -t bash
tsubasa / # env | grep ANDROID_
ANDROID_DATA=/data
ANDROID_ROOT=/system


:-)