Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




5 posts

Wannabe Geek


Topic # 228872 26-Jan-2018 14:17
Send private message

Hi

 

I'm trying to modify hex code in a file that shows a date in a program.
I cannot figure out the code:

 

a5 c6 = 2017/04/05

 

3e c8 = 2017/08/14

 

7b c9 = 2017/11/31

 

 

 

What would be the hex code to display 2017/12/14

 

Any help greatly appreciated


Filter this topic showing only the reply marked as answer Create new topic
7129 posts

Uber Geek
+1 received by user: 3353

Subscriber

  Reply # 1947204 26-Jan-2018 15:11
Send private message

Your dates don't make sense. Assuming the last figure is the day, and the one before is the month, there are not 31 days in November so the date is impossible. It doesn't work the other way either, since there are not 14 months.

 

 





I reject your reality and substitute my own. - Adam Savage
 




5 posts

Wannabe Geek


  Reply # 1947216 26-Jan-2018 15:49
Send private message

Correct the date format is indeed YYYY/MM/DD

The 7b c9 was the result of me changing the code and the software displaying 2017/11/31

7a c9 would indeed show 2017/11/30

 
 
 
 


Try Wrike: fast, easy, and efficient project collaboration software
1450 posts

Uber Geek
+1 received by user: 177


  Reply # 1947218 26-Jan-2018 15:52
Send private message

Can you post the results of some sequential dates eg

 

2017/04/01

 

2017/04/02

 

2017/04/03

 

etc


1394 posts

Uber Geek
+1 received by user: 142




5 posts

Wannabe Geek


  Reply # 1947230 26-Jan-2018 16:13
Send private message

MurrayM

Ive had a read on a few posts from that google search but unfortunately it's way over my head! Anyway you could help out to give me the hex values to display 2017/12/14

418 posts

Ultimate Geek
+1 received by user: 59


  Reply # 1947233 26-Jan-2018 16:30
Send private message

Youre going to need to give us some more examples/data so we can reverse engineer the formula.

 

I'm going to guess that 5 bits store the day (32 values possible with 5 bits). 4 bits for the month.  You then have 7 bits left over for the year.  There'd be some epoc date/year for this too.  1950 maybe (you have up to 127 years you could store).  Could be 1970. Could be something else entirely.

 

We know its not storing days since an epoc date and using function to calculate the date from that.  Otherwise your single bit change would not have yielded an invalid date.  You could try incrementing a bit at a time and see what dates come out.  Probably find one or two more increments and either the month or the year would change (it may not be stored as day, month year.  Could be day, year, month or any combination of!)


7129 posts

Uber Geek
+1 received by user: 3353

Subscriber

  Reply # 1947238 26-Jan-2018 16:39
Send private message

This link might help you.





I reject your reality and substitute my own. - Adam Savage
 


324 posts

Ultimate Geek
+1 received by user: 128

Subscriber

  Reply # 1947246 26-Jan-2018 17:00
Send private message

Is this some date the program displays when it runs, or are you trying to change some property the program uses?




5 posts

Wannabe Geek


  Reply # 1947251 26-Jan-2018 17:08
Send private message

This is a date the program displays when it runs

418 posts

Ultimate Geek
+1 received by user: 59


  Reply # 1948013 29-Jan-2018 08:04
2 people support this post
Send private message

Did a little bit more experimenting....

 

If you're running Windows open your calculater and set it to programming mode.  Then type in the dates in YYYYMMDD format.

 

The values you gave us earlier then show these "decimal" to hex values:

 

2017/04/05 => 20170405 = 0x133C6A5

 

2017/08/14 => 20170814 = 0x133C83E

 

2017/11/31 => 20171131 = 0x133C97B

 

2017/11/30 => 20171130 = 0x133C97A

 

 

 

Those are the 4 dates you gave us with corresponding hex values.  Observe that the last two bytes are month and day values, with the bytes simply swapped.  I think your programme is storing the values as 4 bytes you've only been giving us the last two.

 

I would then guess your required value for 2017/12/14 is CEC9

 

Here's the working...

 

2017/12/14 => 20171214 => 0x133C9CE.  Take the last two bytes (C9CE) and swap them to CEC9




5 posts

Wannabe Geek


  Reply # 1948031 29-Jan-2018 09:15
Send private message

nzkc:

 

Did a little bit more experimenting....

 

If you're running Windows open your calculater and set it to programming mode.  Then type in the dates in YYYYMMDD format.

 

The values you gave us earlier then show these "decimal" to hex values:

 

2017/04/05 => 20170405 = 0x133C6A5

 

2017/08/14 => 20170814 = 0x133C83E

 

2017/11/31 => 20171131 = 0x133C97B

 

2017/11/30 => 20171130 = 0x133C97A

 

 

 

Those are the 4 dates you gave us with corresponding hex values.  Observe that the last two bytes are month and day values, with the bytes simply swapped.  I think your programme is storing the values as 4 bytes you've only been giving us the last two.

 

I would then guess your required value for 2017/12/14 is CEC9

 

Here's the working...

 

2017/12/14 => 20171214 => 0x133C9CE.  Take the last two bytes (C9CE) and swap them to CEC9

 

 

 

 

You are bang on nzkc, it worked!! I remember experimenting with first byte values with C9 but must not have made it up to CE!

 

Thank you very much for taking the time to figure that out it will be a huge help both now and in the future, if you were around Wellington I would gladly buy you a beer, cheers!


Filter this topic showing only the reply marked as answer Create new topic



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

UpStarters - the New Zealand tech and innovation story
Posted 21-May-2018 09:55


Lightbox updates platform with new streaming options
Posted 17-May-2018 13:09


Norton Core router launches with high-performance, IoT security in New Zealand
Posted 16-May-2018 02:00


D-Link ANZ launches new 4G LTE Dual SIM M2M VPN Router
Posted 15-May-2018 19:30


New Panasonic LUMIX FT7 ideal for outdoor: waterproof, dustproof
Posted 15-May-2018 19:17


Ryanair Goes All-In on AWS
Posted 15-May-2018 19:14


Te Papa and EQC Minecraft Mod shakes up earthquake education
Posted 15-May-2018 19:12


Framing Facebook: It’s not about technology
Posted 14-May-2018 16:02


Vocus works with NZ Police and telcos to stop scam calls
Posted 12-May-2018 11:12


Vista Group signs Aeon Entertainment, largest cinema chain in Japan
Posted 11-May-2018 21:41


New Privacy Trust Mark certifies privacy and customer control
Posted 10-May-2018 14:16


New app FIXR connects vehicle owners to top Mechanics at best prices
Posted 10-May-2018 14:13


Nutanix Beam gives enterprises control of the cloud
Posted 10-May-2018 14:09


D-Link ANZ launches Covr Seamless Wi-Fi System
Posted 10-May-2018 14:06


Telstra, Intel and Ericsson demonstrate a 5G future for esports
Posted 10-May-2018 13:59



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.