1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Daylight savings date identification over the net

Discussion in 'Embedded' started by Dimiter_Popoff, Mar 30, 2014.

  1. Dimiter_Popoff

    Tom Gardner Guest

    Oh good grief. If you want to play silly games with
    'most reasonable definitions of "day"', then a terran "day"
    lasts /anywhere/ between 0 and 24 hours.

    To take merely the first line of the first google hit
    day noun 1. the interval of light between two successive
    nights; the time between sunrise and sunset
    from http://dictionary.reference.com/browse/day
    and consider anywhere in the arctic or antarctic.

    So you would give equal credibility to a nutter using a calendar
    based on the "ancient day" of 6 hours? (Because the earth's
    day was originally 6 hours long).

    Strawman argument - very revealing.
     
    Tom Gardner, Apr 3, 2014
    #41
    1. Advertisements

  2. Dimiter_Popoff

    Don Y Guest

    Hi Dimiter,

    Getting *a* date/time (UTC) is easy! It is then up to the
    devices themselves to adjust for "local conventions". They
    would have to periodically update their time zone tables
    based on geographic and legislative changes. E.g., here
    (US) there are regions of the country that do NOT observe
    savings time. And, there have been times when legislation
    has *altered* the observance of said time changes.

    In short, you can't code one solution and hope it will always
    work. Nor is there a "standard"/service that would provide this
    information to you.

    As a (non-portable) *hack*, you could query google for "current
    Either allow them to submit a query to you similar to the
    google one outlined above; or, push updates to the time zone
    tables periodically (folks who don't connect to you "often
    enough" don't get the benefit of having the most recent
    tables)

    [BTW, this can also handle leap second scheduling]

    Personally, I find it easier to just maintain a monotonically
    increase count of "elapsed time" (since some arbitrary epoch)
    that devices use to know "what time it is". I can tweek the
    timebase dynamically to track "the passage of time" more
    accurately (i.e., so one "count", on average, corresponds to
    the time required for light to travel 299,792,458 meters)
    but always ensure that "future >= now >= past".

    How this notion of time is presented to the user is then
    completely arbitrary (i.e., defined by the application).
    So, the fact that user time exhibits "discontinuities"
    is an issue that the *user* deals with and not the device.

    [E.g., user could decide -- erroneously -- to set the time/date
    to Jan 2, 2035 4:23PM at THIS INSTANT! Is this "wrong"?
    Is setting your alarm clock "5 minutes fast" also *wrong*??]
     
    Don Y, May 6, 2014
    #42
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.