Author Topic: Decoding the format of cityx.txt.time  (Read 12289 times)

Broesel

  • TodayPlus Veteran
  • *****
  • Posts: 595
Decoding the format of cityx.txt.time
« on: March 24, 2005, 07:25:52 AM »
With the help from Nas of the PPCWelt-Forum we are a step closer, to
decode the format of the cityx.txt.time. :D

There are two values in the cityx.txt.time.

The first value seems to be a counter that is increased every 7 Minutes
and is taken to compute the date and time.

The first three digits of the second value are the seconds and if that
value goes over 420 the first value is increased by one.

The other 7 digits seems to not be used by computing the time.
If it is set to 0000000 nothing happens
 
You can test that by increasing the first value with one. The updatetime
is increased by 7 Minutes then.
When increasing the first three numbers of the second value by 60, the
updatetime is increased by 1 minute.

Nas is now trying to get the value for 01.01.2005 00:00, so hopefully
with the help of our php-exe-specialist(s) we will be able to write
the cityx.txt.time, when downloading weatherupdates from other servers.

Regards Broesel

uk_skinner

  • Global Moderator
  • TodayPlus Veteran
  • *****
  • Posts: 1313
Re: Decoding the format of cityx.txt.time
« Reply #1 on: March 24, 2005, 07:30:47 AM »
Quote from: "Broesel"
With the help from Nas of the PPCWelt-Forum we are a step closer, to
decode the format of the cityx.txt.time. :D

There are two values in the cityx.txt.time.

The first value seems to be a counter that is increased every 7 Minutes
and is taken to compute the date and time.

The first three digits of the second value are the seconds and if that
value goes over 420 the first value is increased by one.

The other 7 digits seems to not be used by computing the time.
If it is set to 0000000 nothing happens
 
You can test that by increasing the first value with one. The updatetime
is increased by 7 Minutes then.
When increasing the first three numbers of the second value by 60, the
updatetime is increased by 1 minute.

Nas is now trying to get the value for 01.01.2005 00:00, so hopefully
with the help of our php-exe-specialist(s) we will be able to write
the cityx.txt.time, when downloading weatherupdates from other servers.

Regards Broesel



brosel:

   Thanks for the update.

   I also posted the suggestion at German Forum.  I think I figured out the first one that is the system time number of the file time of the city.txt.  But  I have no clue for the second one.  

  As I suggested, your forum got developer thread for .Net CF and the users over there are skilled programmer.  They will have better idea.  So post your wuestion over there and someone must have the answer.  But you have to translate for me.  If I knoe the codes then I can build the city.time.txt using radar.exe

Broesel

  • TodayPlus Veteran
  • *****
  • Posts: 595
Re: Decoding the format of cityx.txt.time
« Reply #2 on: March 24, 2005, 07:46:29 AM »
Quote from: "uk_skinner"

   I also posted the suggestion at German Forum.  I think I figured out the first one that is the system time number of the file time of the city.txt.  But  I have no clue for the second one.  

  As I suggested, your forum got developer thread for .Net CF and the users over there are skilled programmer.  They will have better idea.  So post your wuestion over there and someone must have the answer.  But you have to translate for me.  If I knoe the codes then I can build the city.time.txt using radar.exe


Well, will do some more investigation, and if i can make me clear,
maybe post in the developer-corner of ppcwelt.

Will look at the timestamp of the files ....

Regards Broesel

Broesel

  • TodayPlus Veteran
  • *****
  • Posts: 595
Decoding the format of cityx.txt.time
« Reply #3 on: March 24, 2005, 04:07:33 PM »
As I mentioned on the ppcwelt-forum,
I have an idea to another solution, that gives us even more as we have already:

We need the radar.exe to download the weatherinformation from another server.
So why not let the radar.exe write a date and a timestring into the registry
(under the text-key) ?

We can access the string via text-command and are getting a date
and time from the last update.

What do you think ?

Regards Broesel

uk_skinner

  • Global Moderator
  • TodayPlus Veteran
  • *****
  • Posts: 1313
Decoding the format of cityx.txt.time
« Reply #4 on: March 24, 2005, 04:14:51 PM »
Quote from: "Broesel"
As I mentioned on the ppcwelt-forum,
I have an idea to another solution, that gives us even more as we have already:

We need the radar.exe to download the weatherinformation from another server.
So why not let the radar.exe write a date and a timestring into the registry
(under the text-key) ?

We can access the string via text-command and are getting a date
and time from the last update.

What do you think ?

Regards Broesel


broesel:

1) I would guess TP will search for the city1.txt.time file in the buffer, I just don't know what would happened if it is not there.  

2) If the update time is in text-key, then it can not be used to determine wheather your weather information is out of date or not.  In TP, you only can "print/show" time, you can not "compare" them.

Broesel

  • TodayPlus Veteran
  • *****
  • Posts: 595
Decoding the format of cityx.txt.time
« Reply #5 on: March 24, 2005, 04:20:52 PM »
Quote from: "uk_skinner"

broesel:

1) I would guess TP will search for the city1.txt.time file in the buffer, I just don't know what would happened if it is not there.  

2) If the update time is in text-key, then it can not be used to determine wheather your weather information is out of date or not.  In TP, you only can "print/show" time, you can not "compare" them.


TP only search for the cityx.txt.time when using text,..... [updatetime]
that would not be neccessary, when we access the reg-time.

Point 2 is right, but I don't like "out of data", so I do no more compare, if
actual weather is timed out. I would be happy, if I could see from what
date and time the data are

Regards Broesel

uk_skinner

  • Global Moderator
  • TodayPlus Veteran
  • *****
  • Posts: 1313
Decoding the format of cityx.txt.time
« Reply #6 on: March 24, 2005, 04:32:17 PM »
Opps, not "out of data", it should be "out of dated".. :oops:

Correct me if I am wrong.  TP has to get update time from somewhere in order to decide the weather/rss text needs to be updated.  My impression was if you set 60 min in the configure and you tap update before 60 minutes, TP will not do the downloading.  In other words, TP will use the city/rss.txt.time to access the llatest update time for city/rss.txt and compar to the setting you set in configure.  Maybe I was wrong all the way??? :roll:

Edit "weatherupdatetimediff", yes that is the code...

Broesel

  • TodayPlus Veteran
  • *****
  • Posts: 595
Decoding the format of cityx.txt.time
« Reply #7 on: March 24, 2005, 04:35:02 PM »
Hm , sorry seems to be a stupid idea :oops:

It is surely also use by "weatherupdatetimediff" and that is a command,
we usually have in every skin.

So it could only be an addon, to get the "update-date"

Regards Broesel

eemond

  • TodayPlus User
  • **
  • Posts: 81
Decoding the format of cityx.txt.time
« Reply #8 on: March 29, 2005, 02:14:33 PM »
Cracked the city1.txt.time mystery today. Should have a little EXE that will run on your PDA and update all your cityx.txt.time files in a few days.

eemond

ZapMe1

  • TodayPlus Veteran
  • *****
  • Posts: 551
Decoding the format of cityx.txt.time
« Reply #9 on: March 29, 2005, 02:27:21 PM »
Quote from: "eemond"
Cracked the city1.txt.time mystery today. Should have a little EXE that will run on your PDA and update all your cityx.txt.time files in a few days.

eemond


Very Good News, Ed !!  Great job.....  The talent here is nothing short of Amazing !!!!
ZapMe1

"The most knowledgable person in the world is not the one who possesses the most knowledge, but the one who surrounds themselves with the greatest number of knowledgable people"

Broesel

  • TodayPlus Veteran
  • *****
  • Posts: 595
Decoding the format of cityx.txt.time
« Reply #10 on: March 29, 2005, 02:54:08 PM »
Quote from: "eemond"
Cracked the city1.txt.time mystery today. Should have a little EXE that will run on your PDA and update all your cityx.txt.time files in a few days.

eemond


Whow, thanks for coming by eemond ....

Good news  :D

Regards Broesel

Timmy

  • TodayPlus Veteran
  • *****
  • Posts: 640
Decoding the format of cityx.txt.time
« Reply #11 on: March 29, 2005, 04:36:10 PM »
Quote from: "eemond"
Cracked the city1.txt.time mystery today. Should have a little EXE that will run on your PDA and update all your cityx.txt.time files in a few days.

eemond


Eemond,

Thank you that you are willing to help us!!!! Is very appreciated!!!!

Timmy
Toshiba e750BT, WM 2003, Today Plus 0.11.0, WISbar Adv, Agenda Fusion, Pocket Slides, TomTom

eemond

  • TodayPlus User
  • **
  • Posts: 81
Decoding the format of cityx.txt.time
« Reply #12 on: March 29, 2005, 06:40:33 PM »
Here's an EXE to run on your PDA. UK was headed in the right direction. The city1.txt.time file contains the datetime stamp of the LastWrite to the city1.txt file. The datetime stamp is the concatenation of the two lines in the city1.txt.time file (Google GetFileTime).

The EXE gets the BasePath and numcities from your Registry and loops through your city1.txt files, writing the LastWrite datetime stamp into the city1.txt.time file.

Backup your PDA as with any EXE. Have fun.

eemond

Broesel

  • TodayPlus Veteran
  • *****
  • Posts: 595
Decoding the format of cityx.txt.time
« Reply #13 on: March 30, 2005, 01:23:17 AM »
Quote from: "eemond"
Here's an EXE to run on your PDA. UK was headed in the right direction. The city1.txt.time file contains the datetime stamp of the LastWrite to the city1.txt file. The datetime stamp is the concatenation of the two lines in the city1.txt.time file (Google GetFileTime).

The EXE gets the BasePath and numcities from your Registry and loops through your city1.txt files, writing the LastWrite datetime stamp into the city1.txt.time file.


Thanks for the finding, eemond. :D
I was looking for filetime and getfiletime
too, but did not find the right lines, so thanks again for you effort.

Will give it a try, when I get home...

Regards Broesel

Broesel

  • TodayPlus Veteran
  • *****
  • Posts: 595
Decoding the format of cityx.txt.time
« Reply #14 on: March 30, 2005, 09:31:56 AM »
Hey eemond,

the exe doesn't work under PPC2002, but as you gave me the sources,
I could compile it and run on my device.

It works fine and all files where written well,
the [updatetime] is taken correctly from the files ...

Thanks once more for your work ...

Regards Broesel