On Tue, 12 Jan 2021 17:24:52 -0600, Mike Schwab wrote: >Request for information. >To convert from STCK format to Unix time, what constants would you >subtract from the STCK value for the same origin, then divide by what >constant for the same time unit? Or divide / subtract if easier. > An example in Regina, tested with Itschak's hex example, giving the same result as http://www.longpelaexpertise.com/toolsTOD.php
1073 $ cat timeoff trace R signal on novalue numeric digits 20 call putenv "TZ=Universal" TodOff = date( 'T', '1900-01-01', 'I' ) TimeNow = x2d( 'D91B6D3EF6430440' ) TimeDiv = 4096000000 UnixTime = TimeNow % TimeDiv + TodOff 1074 $ 1074 $ regina timeoff 2 *-* signal on novalue 3 *-* numeric digits 20 5 *-* call putenv "TZ=Universal" 7 *-* TodOff = date( 'T', '1900-01-01', 'I' ) >=> "-2208988800" 8 *-* TimeNow = x2d( 'D91B6D3EF6430440' ) >=> "15644217847788536896" 9 *-* TimeDiv = 4096000000 >=> "4096000000" 11 *-* UnixTime = TimeNow % TimeDiv + TodOff >V> "15644217847788536896" >V> "4096000000" >V> "-2208988800" >=> "1610400322" >> >> -----Original Message----- >> >> From: Itschak Mugzach >> >> Sent: Tuesday, January 12, 2021 10:00 AM >> >> >> >> This is the STCK value: D91B6D3EF6430440 (I have it in hex in variable >> >> TOD) >> >> Converted to decimal : 15644217847788536896 >> >> Actual dat eof run is : Yesterday -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN