Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Ya'll hear about the geometer who went to the beach to catch some rays and became a tangent ?


devel / comp.lang.cobol / Re: HP tandem Cobol85 convert date-time to timestamp

SubjectAuthor
* HP tandem Cobol85 convert date-time to timestampMemmedaga
+- Re: HP tandem Cobol85 convert date-time to timestampVincent Coen
+- Re: HP tandem Cobol85 convert date-time to timestampDennis Lee Bieber
`- Re: HP tandem Cobol85 convert date-time to timestamppete dashwood

1
HP tandem Cobol85 convert date-time to timestamp

<2a25a1b1-f6ce-4664-ac81-6f6f760dab32n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=157&group=comp.lang.cobol#157

  copy link   Newsgroups: comp.lang.cobol
X-Received: by 2002:a05:6214:11ae:: with SMTP id u14mr22175417qvv.16.1625645828750;
Wed, 07 Jul 2021 01:17:08 -0700 (PDT)
X-Received: by 2002:a25:be8a:: with SMTP id i10mr30559779ybk.176.1625645828498;
Wed, 07 Jul 2021 01:17:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.cobol
Date: Wed, 7 Jul 2021 01:17:08 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=185.220.152.249; posting-account=nVVCRgoAAACrQkyRv5XcWnnembs0sPhF
NNTP-Posting-Host: 185.220.152.249
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2a25a1b1-f6ce-4664-ac81-6f6f760dab32n@googlegroups.com>
Subject: HP tandem Cobol85 convert date-time to timestamp
From: mkeles84@gmail.com (Memmedaga)
Injection-Date: Wed, 07 Jul 2021 08:17:08 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Memmedaga - Wed, 7 Jul 2021 08:17 UTC

Hi,
I can create timestamp value in realtime using "ENTER TAL "JULIANTIMESTAMP" GIVING S-TIMESTAMP"
For example, timesamp 212492402667471197 date 20210707 time10242747
Now, I want to create timesamp value using input date and time.
I mean date 20190101 time 23595900, I want to find what was timestamp value for previous dates?

Re: HP tandem Cobol85 convert date-time to timestamp

<1625660488@f1.n250.z2.fidonet.ftn>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=158&group=comp.lang.cobol#158

  copy link   Newsgroups: comp.lang.cobol
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: VBCoen@gmail.com (Vincent Coen)
Newsgroups: comp.lang.cobol
Subject: Re: HP tandem Cobol85 convert date-time to timestamp
Date: Wed, 07 Jul 2021 13:21:28 +0100
Organization: A noiseless patient Spider
Lines: 17
Sender: "Vincent Coen" <VBCoen@gmail.com>
Message-ID: <1625660488@f1.n250.z2.fidonet.ftn>
References: <2a25a1b1-f6ce-4664-ac81-6f6f760dab32n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: reader02.eternal-september.org; posting-host="37be0cf3d374e8f0ca9eca95a410c230";
logging-data="20803"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+/kWAzGAwmEoEzo13jXaEK"
Cancel-Lock: sha1:pF0EBu6jJRA4feBS9bOUybtcaHA=
X-FTN-TID: MBSE-FIDO 1.0.7.22 (GNU/Linux-x86_64)
X-Newsreader: GoldED+/LNX 1.1.5 (Linux 5.10.46-server-1.mga7 CPU UNKNOWN)
X-FTN-Sender: Vincent Coen <Vincent.Coen@f1.n250.z2.fidonet.org>
X-FTN-AREA: COMP.LANG.COBOL
X-FTN-CHRS: UTF-8 2
X-FTN-PATH: 250/1
X-FTN-SEEN-BY: 25/0 21 250/0 1 2 3 4 5 6 7 10 21 263/0 301/1 371/52
X-FTN-MSGID: 2:250/1@fidonet 60e59c51
X-Origin-Newsgroups: comp.lang.cobol
X-FTN-PID: GED+LNX 1.1.5-b20180707
X-Comment-To: Memmedaga <mkeles84@gmail.com>
REPLY: googlegroups.com 734e4e57
X-FTN-TZUTC: 0100
 by: Vincent Coen - Wed, 7 Jul 2021 12:21 UTC

Hello Memmedaga!

Wednesday July 07 2021 09:17, Memmedaga wrote to All:

> Hi,
> I can create timestamp value in realtime using "ENTER TAL
> "JULIANTIMESTAMP" GIVING S-TIMESTAMP" For example, timesamp
> 212492402667471197 date 20210707 time10242747 Now, I want to create
> timesamp value using input date and time. I mean date 20190101 time
> 23595900, I want to find what was timestamp value for previous dates?

RTFM.

Vincent

Re: HP tandem Cobol85 convert date-time to timestamp

<mlibeg91l3ufhci15mgicia16od6ipsfgf@4ax.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=159&group=comp.lang.cobol#159

  copy link   Newsgroups: comp.lang.cobol
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 07 Jul 2021 10:47:24 -0500
From: wlfraed@ix.netcom.com (Dennis Lee Bieber)
Newsgroups: comp.lang.cobol
Subject: Re: HP tandem Cobol85 convert date-time to timestamp
Date: Wed, 07 Jul 2021 11:47:24 -0400
Organization: IISS Elusive Unicorn
Message-ID: <mlibeg91l3ufhci15mgicia16od6ipsfgf@4ax.com>
References: <2a25a1b1-f6ce-4664-ac81-6f6f760dab32n@googlegroups.com>
User-Agent: ForteAgent/8.00.32.1272
X-No-Archive: YES
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 25
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-OMHsQ7+mJ3LStWtO4ozo7XIIbWihL2Z7fNr1yIwVNGsxskZEFcOCPUl9EKSW5lYgqiA+aaBqtgyAiNw!4rF+jflXJNLu3L80AyadR9PE3fqrSfZYaUmFORDGbs2elxaIODUIYhsoj7G32eI4j0HFLY02
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 2170
 by: Dennis Lee Bieber - Wed, 7 Jul 2021 15:47 UTC

On Wed, 7 Jul 2021 01:17:08 -0700 (PDT), Memmedaga <mkeles84@gmail.com>
declaimed the following:

>Hi,
>I can create timestamp value in realtime using "ENTER TAL "JULIANTIMESTAMP" GIVING S-TIMESTAMP"
>For example, timesamp 212492402667471197 date 20210707 time10242747
>Now, I want to create timesamp value using input date and time.
>I mean date 20190101 time 23595900, I want to find what was timestamp value for previous dates?

Without documentation for that function it is difficult to provide
advice.

The astronomical Juliad Day for 20210707 is 2459402.5 (Julian day rolls
over at noon, so midnight is 0.5 -- avoids nightly observations changing
day num)

Subtracting 2124924 from 2459402.5 and converting the result to
calendar date seems to imply that Tandem is using October 3 3798 BC as a
zero, when Julian Date proper uses January 1.5 [noon] 4713 BC as the zero
date.

--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

Re: HP tandem Cobol85 convert date-time to timestamp

<il2ba1Fs5ibU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=162&group=comp.lang.cobol#162

  copy link   Newsgroups: comp.lang.cobol
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: dashwood@enternet.co.nz (pete dashwood)
Newsgroups: comp.lang.cobol
Subject: Re: HP tandem Cobol85 convert date-time to timestamp
Date: Mon, 12 Jul 2021 20:03:12 +1200
Lines: 96
Message-ID: <il2ba1Fs5ibU1@mid.individual.net>
References: <2a25a1b1-f6ce-4664-ac81-6f6f760dab32n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net J6sLMUI4zET7uVpusmBb1g2ihGZuUx6+Tu57S7ZXFLmOLWnmmW
Cancel-Lock: sha1:DN+/D6gehaG4yQ97G9O8zFi5BrM=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
In-Reply-To: <2a25a1b1-f6ce-4664-ac81-6f6f760dab32n@googlegroups.com>
Content-Language: en-US
 by: pete dashwood - Mon, 12 Jul 2021 08:03 UTC

On 7/07/2021 20:17, Memmedaga wrote:
> Hi,
> I can create timestamp value in realtime using "ENTER TAL "JULIANTIMESTAMP" GIVING S-TIMESTAMP"
> For example, timesamp 212492402667471197 date 20210707 time10242747
> Now, I want to create timesamp value using input date and time.
> I mean date 20190101 time 23595900, I want to find what was timestamp value for previous dates?
>

The HP TAL language has no such function so this must be part of the
COBOL support.

It will be a program written in TAL and provided as a function for COBOL
to use. (Maybe part of a COBOL "Library" provided with the Compiler...)

It is not uncommon to write Julian converters or even provide them
online so people can test date conversions both ways.

Unfortunately, EITHER:

1. The provided FUNCTION (JULIANTIMESTAMP) is wrong.

Pretty unlikely, but not impossible...
OR...

2. It does NOT return a standard Julian time string...

OR...

3. The STRING YOU POSTED HERE is incorrect.

I tested your string through several Julian converters and here's a
comprehensive description of what they made of it:

The calendar date for 212492402667471197 is 299817663961704000:0:0.00 UT
on September 30, 581784438190380 .

Some different formats for your copying and pasting pleasure:

September 30 581784438190380
30/9/581784438190380 day/month/year
9/30/581784438190380 month/day/year
30-9-581784438190380 day-month-year
9-30-581784438190380 month-day-year
30/9/581784438190380/299817663961704000/0/0.00
day/month/year/hour/minute/second
30/9/5817844380380
9/30/5817844380380
30-9-5817844380380
9-30-5817844380380
This is nonsense.

The Julian string for the date and time you requested {date 20190101
time 23595900}, is: 2458485.49999

Note that it contains a decimal point. Your string does not.

Just to check, I ran it back and got:

The calendar date for 2458485.49999 is 23:59:59.14 UT on January 1, 2019

Given that at least 3 converters I used all gave the same results, it is
reasonable to assume that there is a standard conversion algorithm and
we would expect the HP routine to use it.

However, my curiosity was piqued now so I decided to find out more about
this routine.

It comes in different flavours but there is a comprehensive description
of the parameters to it and what it does here:

http://nonstoptools.com/manuals/Guardian-D-ProcCalls.pdf

"A 64-bit Julian timestamp is based on the Julian Date. It is a quantity
equal to the number of microseconds since 12:00 (noon) Greenwich mean
time (Julian proleptic calendar) January 1, 4713 B.C. This timestamp can
represent either Greenwich mean time, local standard time, or local
civil time. There is no way to examine a Julian timestamp and determine
which of the three times it represents. "

There is enough information in the document linked above, for you to
create your own algorithm, decipher the time and date from it, and do
vice versa. There are also some other functions you could look at that
may help significantly.

If you would like to have it done for you, contact me and I'll give you
a price.

Cheers,

Pete.

--
I used to write *COBOL*; now I can do *anything*...

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor