Thursday, April 25, 2024
 Popular · Latest · Hot · Upcoming
25
rated 0 times [  25] [ 0]  / answers: 1 / hits: 15020  / 2 Years ago, sat, july 16, 2022, 4:38:15

How do I get the ls command to show its dates and times in UTC, instead of localtime?



I don't want to permanently change the local time for my system to do this.


More From » time

 Answers
7

One can set the time zone environment variable for each invocation of ls like so:



TZ=utc ls -l


or set it once with:



export TZ=utc


in a shell to have it always on, for the remaining duration of the shell session.


[#22124] Saturday, July 16, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fieldcheon

Total Points: 24
Total Questions: 105
Total Answers: 109

Location: Western Sahara
Member since Tue, Feb 16, 2021
3 Years ago
fieldcheon questions
Fri, Apr 1, 22, 05:58, 2 Years ago
Wed, Feb 2, 22, 03:31, 2 Years ago
Sat, Aug 14, 21, 01:24, 3 Years ago
;