Shrug. The algo given relies on three things:

  1. The number given by time() increases by 1 every second of time that passes (IE is in seconds since some epoch.) (This is true for all OSes, and is part of the defintion of time() given in perlfunc.)
  2. The number given is invariant on the TZ the computer is in, assuming the computer is set up correctly. (This is true for all current ports that I am directly aware of, but not gaurnteed by perlfunc:time, nor perlport, as far as I can see. (I suspect it's even true for DOS, if you set $ENV{TZ} correctly, which I include under "assuming the computer is set up correctly", but I see no documentation of that in perldos.))
  3. The epoch refered to in point 1 is on midnight of some day. This isn't gaurneed by perlfunc:time, nor perlport, but I'm unaware of any platform where it isn't true, and it seems quite insane for it to be untrue.

It should probably be noted that the only platforms I have programming experince on are DOS-based or Linux.


Confession: It does an Immortal Body good.


In reply to Re: Re: Re: Re: Re: Internet Time by theorbtwo
in thread Internet Time by Massyn

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.