EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Daylight savings date identification over the net

Started by Dimiter_Popoff March 30, 2014
On 31/03/14 09:57, David Brown wrote:
> On 31/03/14 10:48, Tom Gardner wrote: >> On 31/03/14 03:22, Richard Damon wrote: >>> Yes, knowing that other answers (for other definitions) are possible is >>> good, but for a very reasonable definition of month and year, 12 IS the >>> answer. >> >> I'm not aware of anything other than 12 being used for >> civil purposes, but some calendars do contain 13 months. > > 13 months makes sense for calendars based on lunar months, although of > course there are not exactly 13 lunar months in a year.
Yet another example of "10% more difficult than expected, recursively"!
>>> Looking at other answers you have accepted, you are demonstrating >>> another bias, for example one answer to the number of days in a year >>> is 1/2. >> >> Unless you're thinking of non-terrestrial calendars, >> you'll have to explain that one! >> > > No need for an explanation, then :-) > > (It's Mercury, to save you looking it up.)
Suspected so, couldn't be bothered to google :)
On 3/31/14, 4:48 AM, Tom Gardner wrote:
> On 31/03/14 03:22, Richard Damon wrote:
\>>>
>> Except that in some domains all days are 24 hours long (or in one case >> all days are about 23 hours, 56 minutes, and 4 seconds long) > > Sure, but that is not everyday (or perhaps every semiyear!) > experience for the "man on the Clapham omnibus", whereas > 23/24/25 is (except '68-'70 in the UK!). >
Actually every day IS about 23 hours, 56 minutes and 4 seconds long, IF you are dealing with Sidereal days.
> If they can't get everyday experience right, there's no > point in considering the "subtleties"! > >
If you are saying that Sidereal days aren't important because they aren't and "everyday experience", then neither are other than 12 months to a year.
>>> Anybody that calls themselves an engineer really ought >>> to have heard of leap seconds. Then, if they ever need >>> to, they can find out more detail. >>> >> Unless they are dealing in UT1, which does NOT have leap seconds. > > If they know the concept of UT1, they'll know the rest - or > at least know they have to go and research the answer. That's > fine by me. > >> >>> Months in a year? Knowing that 12 isn't the only answer >>> is something that an inquiring intelligent educated >>> well-rounded person ought to know. >>> >> >> Yes, knowing that other answers (for other definitions) are possible is >> good, but for a very reasonable definition of month and year, 12 IS the >> answer. > > I'm not aware of anything other than 12 being used for > civil purposes, but some calendars do contain 13 months. > > >> Looking at other answers you have accepted, you are demonstrating >> another bias, for example one answer to the number of days in a year >> is 1/2. > > Unless you're thinking of non-terrestrial calendars, > you'll have to explain that one! >
Yep, you were showing a Terran bias.
On 31/03/14 13:31, Richard Damon wrote:
> On 3/31/14, 4:48 AM, Tom Gardner wrote: >> On 31/03/14 03:22, Richard Damon wrote: > \>>> >>> Except that in some domains all days are 24 hours long (or in one case >>> all days are about 23 hours, 56 minutes, and 4 seconds long) >> >> Sure, but that is not everyday (or perhaps every semiyear!) >> experience for the "man on the Clapham omnibus", whereas >> 23/24/25 is (except '68-'70 in the UK!). >> > > Actually every day IS about 23 hours, 56 minutes and 4 seconds long, IF > you are dealing with Sidereal days.
The original question was about calendars, and I'm not aware of any calendars based on the sidereal day. But that could be another example of the "10% recursive"!
>> If they can't get everyday experience right, there's no >> point in considering the "subtleties"! > > If you are saying that Sidereal days aren't important because they > aren't and "everyday experience", then neither are other than 12 months > to a year.
I haven't said that, of course.
>> Unless you're thinking of non-terrestrial calendars, >> you'll have to explain that one! >> > > Yep, you were showing a Terran bias.
Do you have any pointers to non-terran calendars?
On 2014-03-31, Tom Gardner <spamjunk@blueyonder.co.uk> wrote:
> > Do you have any pointers to non-terran calendars? >
Yes. There's the calender as used on Mars. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world
On 2014-03-31, Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
> On 2014-03-31, Tom Gardner <spamjunk@blueyonder.co.uk> wrote: >> >> Do you have any pointers to non-terran calendars? >> > > Yes. There's the calender as used on Mars. >
And before someone thinks I've lost the plot :-), Google for NASA living on Mars time (and similar search strings) at which point you will find NASA employees have some direct experience of living by a Mars calender. :-) Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world
On 31/03/14 18:20, Simon Clubley wrote:
> On 2014-03-31, Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote: >> On 2014-03-31, Tom Gardner <spamjunk@blueyonder.co.uk> wrote: >>> >>> Do you have any pointers to non-terran calendars? >>> >> >> Yes. There's the calender as used on Mars.
If it isn't in the tz database, it doesn't exist. Bah. Oh, if you insist :)
> And before someone thinks I've lost the plot :-), Google for > > NASA living on Mars time > > (and similar search strings) > > at which point you will find NASA employees have some direct experience > of living by a Mars calender. :-)
Must try and get some astrologers to define what it means to have "Earth in the ascendent" and not "Mars in the ascendent" :) And it that's astrological gibberish, then... ... how can anybody tell? (No. I'm not going to google it. On principle.)
In article <lh8nne$2p3$1@dont-email.me>, dp@tgi-sci.com says...
> About every year when it comes to it I search some reasonable > way to implement it and shortly after I give it upand go > empty handed. > Does anyone know how do MS and Android devices do it? > Where do they look the date up? > Eventually I suppose I'll do some sort of service for > DPS devices myself but it would be > nice if there were something similar to NTP to use. > > Dimiter >
I'm sure they just keep the RTC running GMT or local standard time and just adjust for DLS by massaging that data and NOT messing with the RTC, but that may be too much for a small MCU to handle on the fly. I have done it the "bad" way, which can drift the clock a few seconds per year, on top of the clock's drift, depending on how fast you can pull it all off. I have a DLS flag held in the RTC's free battery backed RAM and I check the time and date against that flag and actually update the RTC accordingly. I wrote a set of routines to check if the date and time falls inside the DLS period and go from there. I saw one implementation that just hard coded the next 10 years of DLS dates and times in a lookup table and adjusted the RTC accordingly. I do have one product that I just don't do it, the owner just adjusts the time when they go to collect the cash in the unit. Which is usually weekly.
On 3/31/14, 10:35 AM, Tom Gardner wrote:
> On 31/03/14 13:31, Richard Damon wrote: >> On 3/31/14, 4:48 AM, Tom Gardner wrote: >>> On 31/03/14 03:22, Richard Damon wrote: >> \>>> >>>> Except that in some domains all days are 24 hours long (or in one case >>>> all days are about 23 hours, 56 minutes, and 4 seconds long) >>> >>> Sure, but that is not everyday (or perhaps every semiyear!) >>> experience for the "man on the Clapham omnibus", whereas >>> 23/24/25 is (except '68-'70 in the UK!). >>> >> >> Actually every day IS about 23 hours, 56 minutes and 4 seconds long, IF >> you are dealing with Sidereal days. > > The original question was about calendars, and I'm not > aware of any calendars based on the sidereal day. >
Then why were there questions about seconds in a minute or hours in a day, these are not calendar questions either.
> But that could be another example of the "10% recursive"! > >>> If they can't get everyday experience right, there's no >>> point in considering the "subtleties"! >> >> If you are saying that Sidereal days aren't important because they >> aren't and "everyday experience", then neither are other than 12 months >> to a year. > > I haven't said that, of course. > >>> Unless you're thinking of non-terrestrial calendars, >>> you'll have to explain that one! >>> >> >> Yep, you were showing a Terran bias. > > Do you have any pointers to non-terran calendars? > >
Here are some found with a bit of searching. https://home.comcast.net/%7Edoowopdon/klingon_history.htm http://www.marketaz.co.uk/StarTrek/Vulcan/calender.html http://calendars.wikia.com/wiki/Middle-earth_calendar (well, this MIGHT be considered terran) Of course, until we get to some other planet, or meet someone who has, these will be be a bit academic. The "Working on Mars Time", was interesting, while the period was short enough they really didn't get to calendars, they did get to clocks. http://starwars.wikia.com/wiki/Galactic_Standard_Calendar
On 01/04/14 03:48, Richard Damon wrote:
> Then why were there questions about seconds in a minute or hours in a > day, these are not calendar questions either.
The number of hours in a day depends on the day of the year - hence calendar information is inherently required That is reflected in the API of software libraries; many default to a particular locale but allow you to set the locale.
>> Do you have any pointers to non-terran calendars? > > Here are some found with a bit of searching. > > https://home.comcast.net/%7Edoowopdon/klingon_history.htm > > http://www.marketaz.co.uk/StarTrek/Vulcan/calender.html > > http://calendars.wikia.com/wiki/Middle-earth_calendar > (well, this MIGHT be considered terran)
Um, I was looking for something with at least a tiny basis in reality.
> Of course, until we get to some other planet, or meet someone who has, > these will be be a bit academic. The "Working on Mars Time", was > interesting, while the period was short enough they really didn't get to > calendars, they did get to clocks.
I suspected as much.
> http://starwars.wikia.com/wiki/Galactic_Standard_Calendar
Anything less fictional? Astrological calendars don't count!
On 4/1/14, 5:09 AM, Tom Gardner wrote:
> On 01/04/14 03:48, Richard Damon wrote: >> Then why were there questions about seconds in a minute or hours in a >> day, these are not calendar questions either. > > The number of hours in a day depends on the day of the > year - hence calendar information is inherently required > That is reflected in the API of software libraries; many > default to a particular locale but allow you to set the locale. > >
Actually, if you look up the definitions of hours, and day, you should find that for most reasonable definitions of "day", you will get that a day is 24 hours (for earth) for EVERY day. It is only for this strange beasty of a "calendar day", or something artificial like "wall clock time" that we get the exception, and this strangeness. You also need to add into the equation where you are talking about, as there are locations which never to this shifting, and others that do it at other times, so just having a calendar isn't good enough.
>>> Do you have any pointers to non-terran calendars? >> >> Here are some found with a bit of searching. >> >> https://home.comcast.net/%7Edoowopdon/klingon_history.htm >> >> http://www.marketaz.co.uk/StarTrek/Vulcan/calender.html >> >> http://calendars.wikia.com/wiki/Middle-earth_calendar >> (well, this MIGHT be considered terran) > > Um, I was looking for something with at least a > tiny basis in reality. > > >> Of course, until we get to some other planet, or meet someone who has, >> these will be be a bit academic. The "Working on Mars Time", was >> interesting, while the period was short enough they really didn't get to >> calendars, they did get to clocks. > > I suspected as much. > > >> http://starwars.wikia.com/wiki/Galactic_Standard_Calendar > > Anything less fictional? Astrological calendars don't count!
So, you say that just because you haven't meet the people using the calendar it doesn't exist? At that point you need to accept that a person may consider that there are always 12 months in a year, and even that as far as they are concerned, always 24 hours in a day (they may be from a place without DST).

The 2024 Embedded Online Conference