> Computers > Programming
Various Topics Home

Programming



Programming Computers Date/Timestamp conversion


Default Date/Timestamp conversion

I cannot figure out the conversion type which was used in the creation
of a timestamp in an ini file. I am creating a program to run through
the ini file and convert it to a csv file. The program which created
the INI file was rainlender. Here is an example timestamp:

StartTime=29767692:382599168 is apparently 2-23-06

If anyone knows the type of algorithm used to convert this
date/(time?), please help.

Default Re: Date/Timestamp conversion

> StartTime=29767692:382599168 is apparently 2-23-06

Can you post more examples with date- _and_ timestamp? This might help
reverse engineering the algorithm.

Ronny
Default Re: Date/Timestamp conversion

29767289:3254419456 = 2-21-2006
29768899:357072896 = 3-1-2006
29775738:3075735552 = 4-4-2006
297777hostinghosting:1601536000 = 4-14-2006
29771916:2440740864 = 3-16-2006
29778555:15286272 = 4-18-2006
29767692:382599168 = 2-23-2006

These are all all day events, so the start and end times are both
listed as the above numbers. I am stumped. Hopefully someone out
there will get it. Thanks.

Default Re: Date/Timestamp conversion

wrote:
>
> 29767289:3254419456 = 2-21-2006
> 29768899:357072896 = 3-1-2006
> 29775738:3075735552 = 4-4-2006
> 297777hostinghosting:1601536000 = 4-14-2006
> 29771916:2440740864 = 3-16-2006
> 29778555:15286272 = 4-18-2006
> 29767692:382599168 = 2-23-2006
>
> These are all all day events, so the start and end times are both
> listed as the above numbers. I am stumped. Hopefully someone out
> there will get it. Thanks.


Please include context and attributions in your articles. Google
is not usenet. For the means of doing this, see my sig. and the
URLs there referenced, below.

At a very rough eyeball guess, the left field appears to measure
days in some units, possibly centidays. The origin and the units
should be easily discovered by a fitting operation. The right
field probably just adds precision.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Chostinghostinghostinghosting on
"show options" at the top of the article, then chostinghostinghostinghosting on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>


Default Re: Date/Timestamp conversion

wrote:

> 29767289:3254419456 = 2-21-2006
> 29768899:357072896 = 3-1-2006
> 29775738:3075735552 = 4-4-2006
> 297777hostinghosting:1601536000 = 4-14-2006
> 29771916:2440740864 = 3-16-2006
> 29778555:15286272 = 4-18-2006
> 29767692:382599168 = 2-23-2006
>
> These are all all day events, so the start and end times are both
> listed as the above numbers. I am stumped. Hopefully someone out
> there will get it. Thanks.


You can try to calculate the number of units per day:

2006, March 16 : 29,771,916 units
2006, March 01 : 29,768,899 units
---------------------------
15 days : 3,017 units
1 day : 3,017 / 15 = 201.1333... units

Given the number of units per day, you can figure out where the calendar
starts:

2006, March 01
= about 29,768,899 (units after epoch)
= about 29,768.899 / 201.1333... (days after epoch)
= about 148,005 (days after epoch)
= about 148,005 / 365 (years after epoch)
= about 405 (years after epoch)

The calendar starts about 405 years before march 2006.

So the calendar probably started in 1601.

Now, googling "date based in 1601", brings me to:


I quote:
> ANSI dates are counted from 1601-01-01 and were adopted by the American
> National Standards Inshostinghostinghostingute for use with COBOL and other computer
> languages. This epoch is the beginning of the last 400-year cycle by which
> leap-years are calculated in the Gregorian calendar. The last year of this
> cycle is the only one divisible by 100 that is a leap-year, which was the
> year 2000, and which was followed by a new 400-year cycle beginning with
> 2001. 32-bit versions of the Microsoft Windows operating system count
> units of one hundred nanoseconds from this epoch.


And, googling "date based in 1601 microsoft", brings me to an example of how
to calculate the date based on the number of nanoseconds:


I hope this helps.





Thread Tools
Display Modes



Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0