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.


SUPERLINER

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
Rikkitic
Awrrr
17218 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.

 

 





Plesse igmore amd axxept applogies in adbance fir anu typos

 


 


 
 
 

Learn cloud, mobile, security, data and web technologies with Pluralsight (affiliate link).
SUPERLINER

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

tchart
2298 posts

Uber Geek

ID Verified
Trusted

  #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




SUPERLINER

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

nzkc
1274 posts

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


Rikkitic
Awrrr
17218 posts

Uber Geek

Lifetime subscriber

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

This link might help you.





Plesse igmore amd axxept applogies in adbance fir anu typos

 


 




djtOtago
978 posts

Ultimate Geek


  #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?


SUPERLINER

5 posts

Wannabe Geek


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

This is a date the program displays when it runs

nzkc
1274 posts

Uber 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


SUPERLINER

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





News and reviews »

Samsung Announces Galaxy AI
Posted 28-Nov-2023 14:48


Epson Launches EH-LS650 Ultra Short Throw Smart Streaming Laser Projector
Posted 28-Nov-2023 14:38


Fitbit Charge 6 Review 
Posted 27-Nov-2023 16:21


Cisco Launches New Research Highlighting Gap in Preparedness for AI
Posted 23-Nov-2023 15:50


Seagate Takes Block Storage System to New Heights Reaching 2.5 PB
Posted 23-Nov-2023 15:45


Seagate Nytro 4350 NVMe SSD Delivers Consistent Application Performance and High QoS to Data Centers
Posted 23-Nov-2023 15:38


Amazon Fire TV Stick 4k Max (2nd Generation) Review
Posted 14-Nov-2023 16:17


Over half of New Zealand adults surveyed concerned about AI shopping scams
Posted 3-Nov-2023 10:42


Super Mario Bros. Wonder Launches on Nintendo Switch
Posted 24-Oct-2023 10:56


Google Releases Nest WiFi Pro in New Zealand
Posted 24-Oct-2023 10:18


Amazon Introduces All-New Echo Pop in New Zealand
Posted 23-Oct-2023 19:49


HyperX Unveils Their First Webcam and Audio Mixer Plus
Posted 20-Oct-2023 11:47


Seagate Introduces Exos 24TB Hard Drives for Hyperscalers and Enterprise Data Centres
Posted 20-Oct-2023 11:43


Dyson Zone Noise-Cancelling Headphones Comes to New Zealand
Posted 20-Oct-2023 11:33


The OPPO Find N3 Launches Globally Available in New Zealand Mid-November
Posted 20-Oct-2023 11:06









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.







NordVPN