Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: DBMS_UTILITY.GET_TIME

Re: DBMS_UTILITY.GET_TIME

From: Howard J. Rogers <howardjr2000_at_yahoo.com.au>
Date: Tue, 3 Dec 2002 20:23:18 +1100
Message-ID: <vB_G9.89226$g9.250834@newsfeeds.bigpond.com>


Oracle's epoch isn't actually arbitrary at all. In fact, it's midnight on December 31st 4713BC (or, as the doco. puts it, January 1st 4712BC) for three very good reasons.

Every 28 years, the same day of the week falls on the same date throughout the calendar. That's called the Solar Cycle. (It can be calculated as (year + 8) mod 28 + 1 -hence 2002 is Solar Cycle number 15).

Every 19 years, the phases of the moon fall on the same dates. That's called the Golden Number, and each year it goes up by one, until it reaches 19, and then it resets. For two year 1's, for example, the new moon falls on the same day of each month for both years. It can be calculated as (year mod 19)+1 -hence 2002 has Golden Number 8)

On 1st September 312, Constantine the Great created a new tax based on a 15 year cycle (and it fell into disuse in 1806, strangely enough), called the Indiction. Each year can be given a number between 1 and 15 depending on where it falls in the Indiction cycle. It can be calculated as ((year+2) mod 15) + 1 -hence 2002 has Indiction number 4).

Justus Scaliger (1540-1609) was a French mathematician (his father was called Julius Caesar Scaliger) who decided to create a comprehensive numbering system for every year imaginable. The numbering system he devised is called the Julian Period, probably after his father. His Julian Period starts on January 1st 4713BC and lasts 7980 years. Why? Because, counting backwards and doing a bit of juggling, in 4713BC the Solar Cycle number was 1, as was the Golden Number, as was the Indiction. If you multiply 19 by 15 by 28, you get 7980 -meaning that in 3268AD (being 7980 years on from 4713BC) the Julian Number will recycle back to 1 again for the first time since 4713BC.

Astronomers have taken the Julian numbering system and extended it so that every *day* since January 1st 4713BC gets its own Julian number, with January 1st 4713BC itself being designated Day Zero. Jnuary 1st 2000 AD was therefore Julian Day 2,451,545. (that's 6712 years sine 4713BC, multiplied b y 365.25 days per year, less the 13 days that the Gregorian Calendar is ahead of the Julian (ie, the real Julius Ceasar's) Calendar).

Just out of interest, Oracle has varied the Julian Period a bit: it's year count recycles on December 31st 4713 AD, not 3268 AD. So we have an extra 1445 years before we have to worry about what happens when they *do* recycle. It is true, however, that every Oracle database on the planet is facing the potential problem of the 'year 4713 problem'. Not that I think we need get too worked up about it just yet!!

Fascinating stuff, I'm sure you'll agree... point is, it's definitely *not* an 'arbitrary' epoch.

Regards
HJR "JK" <jim.katsos_at_oz.quest.com> wrote in message news:ashdt7$rce$1_at_perki.connect.com.au...
> If I run DBMS_UTILITY.GET_TIME I get the number of 100th's of a second
> from some arbitrary epoch.
>
> My question is can I get the approx time given a value returned by
GET_TIME.
> i.e the reverse of get time.
>
> Can I get the date time of the epoch ?
>
> How does the value of DBMS_UTILITY.GET_TIME differ from select * from
> V$timer.
>
> Any info on this would be appreciated.
>
> JK
>
>
>
Received on Tue Dec 03 2002 - 03:23:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US