Reputation: 1418
I have the following known pair of hex values and dates:
4e754e473248 -> 23:56:23 16/02/2017
4e764e473248 -> 23:57:23 16/02/2017
4e784e473248 -> 23:59:23 16/02/2017
304162483248 -> 00:10:37 17/02/2017
304262483248 -> 00:11:37 17/02/2017
30456f483248 -> 00:14:50 17/02/2017
I can't figure out how to convert from one to the other. Does anyone recognize this hex encoding format?
By collecting hundreds of pairs, I came to the mapping bellow. The mapping apply to hours, minutes, seconds. They also hold for day, month and year, although I couldn't test the month and year part for a long stretch of time. Notice that some numbers in the sequence are skipped, for some reason.
The first column is the decoded value, the others are the encoded value in different radixes.
deco dc hx binary
-----------------------
00: 48 - 30 - 00110000
01: 49 - 31 - 00110001
02: 50 - 32 - 00110010
03: 51 - 33 - 00110011
04: 52 - 34 - 00110100
05: 53 - 35 - 00110101
06: 54 - 36 - 00110110
07: 55 - 37 - 00110111
08: 56 - 38 - 00111000
09: 57 - 39 - 00111001 <- jump
10: 65 - 41 - 01000001
11: 66 - 42 - 01000010
12: 67 - 43 - 01000011
13: 68 - 44 - 01000100
14: 69 - 45 - 01000101
15: 70 - 46 - 01000110
16: 71 - 47 - 01000111
17: 72 - 48 - 01001000
18: 73 - 49 - 01001001
19: 74 - 4a - 01001010
20: 75 - 4b - 01001011
21: 76 - 4c - 01001100
22: 77 - 4d - 01001101
23: 78 - 4e - 01001110 <- this is the maximum observed value for hours
24: 79 - 4f - 01001111
25: 80 - 50 - 01010000
26: 81 - 51 - 01010001
27: 82 - 52 - 01010010
28: 83 - 53 - 01010011
29: 84 - 54 - 01010100
30: 85 - 55 - 01010101
31: 86 - 56 - 01010110
32: 87 - 57 - 01010111
33: 88 - 58 - 01011000
34: 89 - 59 - 01011001
35: 90 - 5a - 01011010 <- jump
36: 97 - 61 - 01100001
37: 98 - 62 - 01100010
38: 99 - 63 - 01100011
39: 100 - 64 - 01100100
40: 101 - 65 - 01100101
41: 102 - 66 - 01100110
42: 103 - 67 - 01100111
43: 104 - 68 - 01101000
44: 105 - 69 - 01101001
45: 106 - 6a - 01101010
46: 107 - 6b - 01101011
47: 108 - 6c - 01101100
48: 109 - 6d - 01101101
49: 110 - 6e - 01101110
50: 111 - 6f - 01101111
51: 112 - 70 - 01110000
52: 113 - 71 - 01110001
53: 114 - 72 - 01110010
54: 115 - 73 - 01110011
55: 116 - 74 - 01110100
56: 117 - 75 - 01110101
57: 118 - 76 - 01110110
58: 119 - 77 - 01110111
59: 120 - 78 - 01111000
Upvotes: 1
Views: 1179
Reputation: 45172
Your table can be summarized as
'0' through '9' (hex 30 through 39) = 0 through 9
'A' through 'Z' (hex 41 through 5A) = 10 through 35
'a' through 'z' (hex 61 through 7A) = 36 through 61
The jumps are so that the encoded values are always alphanumeric.
Upvotes: 4