Quantcast
Viewing all articles
Browse latest Browse all 5986

Linux convert UTC to local time in bash script [closed]

I have one issue related to DST while changing UTC datetime to local datetime.My local time is America/Chicago defined in /etc/localtime.

The standard way to convert to any other TZ I used:

TZ="Pacific/Honolulu" date -d '2024-03-10 02:00:00 UTC'

But the same command for New_York is returning an error:

$ TZ="America/New_York" date -d '2024-03-10 02:00:00 UTC'**date: invalid date ‘2024-03-10 02:00:00 UTC’**

What is wrong there?


Viewing all articles
Browse latest Browse all 5986

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>