这是我使用的脚本
(更新版本,来自@elquimista的评论)
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
apt-get install -y tzdata
dpkg-reconfigure --frontend noninteractive tzdata
看起来效果不错。
作为一个班轮:
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata