On Friday, June 22, 2018 at 3:40:49 PM UTC-7, Alexandru wrote:
> Am Freitag, 22. Juni 2018 18:20:33 UTC+2 schrieb Brad Lanam:
> > On Friday, June 22, 2018 at 9:13:45 AM UTC-7, Alexandru wrote:
> > > Am Freitag, 22. Juni 2018 18:06:28 UTC+2 schrieb Brad Lanam:
> > > > On Friday, June 22, 2018 at 7:57:14 AM UTC-7, Alexandru wrote:
> > > > > Hi,
> > > > >
> > > > > What is the best way get the modified date of a file as GMT time?
> > > > >
> > > > > Currently using:
> > > > >
> > > > > clock scan [clock format [file mtime $path]] -gmt 1
> > > > >
> > > > > Is there a shorter way?
> > > > >
> > > > > Regards
> > > > > Alexandru
> > > >
> > > > A timestamp has no time zone applied.
> > > > The time zone is used for display purposes only (clock format).
> > > >
> > > > % file mtime ballroomdj.tcl
> > > > 1529040755
> > > > % set path ballroomdj.tcl
> > > > ballroomdj.tcl
> > > > % clock scan [clock format [file mtime $path]] -gmt 1
> > > > 1529040755
> > > > %
> > >
> > > Perhaps I it's unclear what I mean.
> > > Let's immagine that two persons change the same file at the exact same moment on their computers. If first person lives in New York and the second person in Berlin, the two file will have different dates, although they were changed at the same time. If I want to compare the files and see which file is older, the I need a common time measure. That would be the GMT.
> >
> >
https://en.wikipedia.org/wiki/Unix_time
> >
> > Time zones are only used in the display of time.
> > The unix/windows time is already GMT.
>
> So "[file mtime $path" already givess me the time in GMT? That's cool. So I can always compare the dates of files, no mather what time region?
Files that get transferred across computers may not have their modification time
But comparing two files on different computers and transferring the modification
time will work fine, or comparing the modification time via a networked file system is fine.