My environment variable TZ is set to :/etc/localtime
. File /etc/localtime
is a symbolic link to file /usr/share/zoneinfo/America/Chicago
. So far I am using this to get a local time object:
Time.local(
Crystal::System::Time.load_localtime.not_nil!
)
# 2019-07-16 20:46:50 -05:00
Because the following gives me a Time set to UTC:
Time.local # 2019-07-17 01:46:50 UTC
Are the Crystal standard libs suppose to return a UTC location for TZ=":/etc/localtime" or am I suppose to manually set TZ to a timezone (eg "America/Chicago")?