Post Reply 
Unix/Linux Epoch Time Converter..
02-09-2018, 10:48 PM (This post was last modified: 10-09-2020 04:27 PM by salvomic.)
Post: #16
RE: Unix/Linux Epoch Time Converter..
hi,
I've modified the program for DM42 and Free42 (not HP 42s, as it miss the date), adding a custom Menu:
[Cur] → Current Epoch time [DT→E] → Date and Time to Epoch [E→DT] → Epoch to Date and Time
The program set 3600 as Time Zone variables (Europe, -1), you can set your time/zone (i.e. -18000 as in the original Bill's program).
Code:

00 { 139-Byte Prgm }
01▸LBL "EPOCH"
02 3600
03 STO 00
04 1.01197
05 STO 01
06 86400
07 STO 02
08 SF 27
09▸LBL H
10 "CUR"
11 KEY 1 XEQ A
12 "DT→E"
13 KEY 2 XEQ B
14 "E→DT"
15 KEY 3 XEQ C
16 KEY 9 GTO 99
17 MENU
18▸LBL 20
19 STOP
20 GTO 20
21▸LBL 99
22 CLMENU
23 EXITALL
24 RTN
25▸LBL A
26 DATE
27 TIME
28▸LBL B
29 X<>Y
30 RCL 01
31 X<>Y
32 DDAYS
33 RCL 02
34 ×
35 X<>Y
36 →HR
37 3600
38 ×
39 +
40 RCL 00
41 -
42 RTN
43▸LBL C
44 RCL 00
45 +
46 ENTER
47 ENTER
48 RCL 02
49 ÷
50 IP
51 RCL 01
52 X<>Y
53 DATE+
54 CLA
55 ADATE
56 AVIEW
57 PSE
58 X<>Y
59 RCL 02
60 MOD
61 3600
62 ÷
63 →HMS
64 CLA
65 ATIME
66 AVIEW
67 END

You can obtain the ".raw" version using the SwissMicros' tool.

Enjoy!

EDIT 09 Oct 2020: updated code and link to the tool for .raw conversion.

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Unix/Linux Epoch Time Converter.. - salvomic - 02-09-2018 10:48 PM



User(s) browsing this thread: 1 Guest(s)