问题
As the Search Method "readSearch" of the ZLogstream class needs the Timestamp in TOD format, I've to convert the JAVA Timestamp in TOD (Time of Date) format.
I couldn't find any class (wrapper), which does that for me. Only the getTodClock of the ZUtil class give me the current TOD (Time of Date),but I couldn't convert any timestamp in the right format.
Could anybody help me?
Thanks in advance.
回答1:
This works for me in a Rexx procedure:
Tod = (epoc*4096000000)+9048018124800000000
TOD (Time-of-Day in S360, S370, S390 & z/Arch IBM's archs) is a 64bit counter whose Bit position 31 is incremented every 1.048576 seconds, starting at 1900-01-01.
So, 2**32/1.048576 = 4096000000 = 1 sec.
9048... is the difference between 1900-01-01 and epoch 1970-01-01 in TOD units.
来源:https://stackoverflow.com/questions/46171737/convert-java-timestamp-in-tod-format-time-of-day-on-z-os