Basically - the "time" (i.e 1226667500) is stored in the DB - at server time (in this case, PST - this will NEVER change, so it needs to be saved like that I guess).
What will never change? The fact that the time is stored at "server time", or that it's stored as "PST"? Typically, when a server uses PST, it uses daylight saving time for more than half a year.

You may not have a choice, but you would make life a lot easier for yourself if you store times at seconds1 after Jan 1, 1970 00:00 GMT2. The number of seconds after that point in time is what localtime assumes as input. It's also generally recommended that (Unix) systems keep time in UTC (GMT). Many time formatting routines (including Perl's localtime) look at the TZ environment variable to determine in which timezone to format the time to.

1Put your fingers in your ears and chant "leap seconds do not exist".
2While GMT existed in 1970, and people still know what you mean with it, it officially ceased to exist See sci.astro FAQ. But when you're timing with a resolution of 1 second, UTC is equivalent to GMT for all practical purposes.


In reply to Re^5: Converting from "time" into a nice string? by JavaFan
in thread Converting from "time" into a nice string? by ultranerds

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.