Epoch time in unix is the number of seconds since the beginning of Jan 1st, 1970 GMT (or UTC? It's basically the same thing as far as most people are concerned).

Still, are you sure this is consistent across *nix and Windows.

Yes, stat returns unix epoch times on Windows. But read on.

When I looked at the cloned file's metadata via Windows's file properties it showed a 1 hour time offset.

Explorer shows the timestamp using the current local time zone. Sounds normal, but there's a catch. It views timezones as offsets from GMT, not slices of geograghy, so EST and EDT are two different time zones to it.

If I created a file at

2010-01-01 18:00:00 (local time)

and if checked the creation date today, Explorer would show it as being created at

2010-01-01 17:00:00 (EDT)
rather than
2010-01-01 18:00:00 (America/New_York)

I don't know if that's a problem in Explorer, or a problem with the OS itself. It could even be specific to the file system. This could have an effect on stat.


In reply to Re^2: stat() and time-zone-offsets? by ikegami
in thread stat() and time-zone-offsets? by isync

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.