[SWLUG] using 'date' with british summer time

Dick Porter dick at acm.org
Fri Nov 28 09:26:07 UTC 2003


On Fri, 2003-11-28 at 00:54, bascule wrote:
> hi dick
> ah i see, 'stat --help' states: '%Y   Time of last modification as seconds 
> since Epoch'
> i took that to mean actual seconds, you're saying it's the number of seconds 
> according to the local time?

The number of seconds since the epoch doesn't change, but the
presentation does.

> anyway you mention:
> TZ=GMT date
> if you mean %T   time, 24-hour (hh:mm:ss)
> well i avoided this to avoid the ':' which are illegal in fat16/32, i share 
> some of my pics with others :)

No, this is setting the TZ environment variable for the duration of the
date command.

eg:

[dick at hagbard ~] [ 9:20] 
:; TZ=GMT date
Fri Nov 28 09:20:55 GMT 2003

[dick at hagbard ~] [ 9:20] 
:; TZ=Cuba date
Fri Nov 28 04:21:19 CST 2003

[dick at hagbard ~] [ 9:21] 
:; TZ=Pacific/Galapagos date
Fri Nov 28 03:22:24 GALT 2003


- Dick





More information about the Swlug mailing list