I disagree that your example could cause HUGE confusion. In fact, I think that your proposal can cause HUGE confusion! If different users in the accounts department in different local timezones entered several transactions in the same day, how can you make sense of what happened in what order unless the times are all presented in the same time zone (be it the local timezone for you, the observer, UTC, or any other chosen timezone)?

I agree, in part, to what you said. It is needed to show the complete information to the user, we need one step further in the user interfaces. The display of dates should include the information about the timezone and should provide a way to the user easily see that time in his timezone.

I mean, in some activities, the day of the year represents much information (like, it's on this fiscal year or the next?) but you still want to store the hour and the timezone, right?...

What about triggered events that automatically occured on the account. What timezone should they be presented in, if not the same, normalized, timezone as everything else?

This is, certainly, a problem. But you can still do some tricks, like, setting the timezone to UTC for system events and always you have UTC display as the local timezone. And setting to WET when the date is triggered by a user on the GMT timezone, for example.

On the other hand when using a time format like ISO8601 you can do arithmetic on the date portion (carefully, because of leap years and such), but adding one to the hour may yield an impossible, ambiguous, or duplicate time.

That's the reason you should use a module like DateTime to do such arithmetics. It takes care about this type of issues. And if it doesn't for some issues, that's the place to implement such things...

daniel

In reply to Re^3: Year 2038 by ruoso
in thread Year 2038 by InfiniteLoop

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.