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


#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
Devastation by stupidity
12070 posts

Uber Geek

Lifetime subscriber

  #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 don't think there is ever a bad time to talk about how absurd war is, how old men make decisions and young people die. - George Clooney
 




5 posts

Wannabe Geek


  #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

 
 
 
 


1600 posts

Uber Geek

Trusted
Subscriber

  #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




5 posts

Wannabe Geek


  #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

854 posts

Ultimate Geek


  #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!)


Devastation by stupidity
12070 posts

Uber Geek

Lifetime subscriber

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

This link might help you.





I don't think there is ever a bad time to talk about how absurd war is, how old men make decisions and young people die. - George Clooney
 


 
 
 
 


615 posts

Ultimate Geek

Subscriber

  #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


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

This is a date the program displays when it runs

854 posts

Ultimate Geek


  #1948013 29-Jan-2018 08:04
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


  #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 and LinkedIn »



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 »

OPPO Find X2 Lite brings flagship features to mid-range 5G smartphone
Posted 29-May-2020 12:52


Sony introduces the digital camera ZV-1 for content creators
Posted 27-May-2020 12:47


Samsung Announces 2020 QLED TV Range
Posted 20-May-2020 16:29


D-Link A/NZ launches AI-Powered body temperature measuring system
Posted 20-May-2020 16:22


NortonLifeLock Online Banking Protection now available for New Zealand banks
Posted 20-May-2020 16:14


SD Express delivers new gigabyte speeds for SD memory cards
Posted 20-May-2020 15:00


D-Link A/NZ launches Nuclias cloud managed network solution hosted in Australia
Posted 11-May-2020 17:53


Logitech introduces new video streaming solution for home studios
Posted 11-May-2020 17:48


Next generation Volvo cars to be powered by Luminar LiDAR technology
Posted 7-May-2020 13:56


D-Link A/NZ launches Wi-Fi Certified EasyMesh system
Posted 7-May-2020 13:51


Spark teams up with Microsoft to bring Xbox All Access to New Zealand
Posted 7-May-2020 13:01


Microsoft plans to establish its first datacenter region in New Zealand
Posted 6-May-2020 11:35


Genesis School-gen has joined forces with Mind Lab Kids
Posted 1-May-2020 12:53


Malwarebytes expands into privacy with fast, frictionless VPN
Posted 30-Apr-2020 16:06


Kordia to donate TV airtime on Channel 200 to community groups
Posted 30-Apr-2020 16:00



Geekzone Live »

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


Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



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.