Palm Time application
This is a small application that I have coded for Palm-powered devices. It was more an example so that I can learn PalmOS programming, but it now became quite useful so I also decided to write this page.
|
|
Purpose
The purpose of this small program was to display the time in the places where WebSci offices are located, that is: Goa (India), New Jersey (U.S.), Iasi (Romania) and Novosibirsk (Russian Federation).
As it grown up, I decided to learn some PalmOS database usage functions, therefore it became obvious that I should modify the application to allow the user to enter other time areas, and find them there even if he stops the program.
For this I used PalmOS databases. Users are able to enter new time areas, giving a name that it's at most 16 characters (should be enough, isn't it?) and the GMT offset in the format "+HHMM" or "-HHMM". Variations of this format are understood as well, here's a list (examples):
- +5 will mean "GMT + 5 hours", -2 will mean "GMT - 2 hours"
- +10 will mean "GMT + 10 hours", -12 will mean "GMT - 12 hours"
- +230 will mean "GMT + 2 hours and 30 minuts". Similar for "-230".
- -1045 will mean 10 hours and 45 minutes before GMT.
Hope everything's clear. Easy, isn't it? Now, all the time areas inside the database are displayed in a list (whose draw function was customized, by the way, so that it doesn't use additional memory for list). You are also allowed to choose the location you're in from the list, and the other locations' time will be recomputed function of the current time and your location. See the screen-shots at the top of this page for such example. This simple way you know what is the time in which area, assuming that you know where you are and the time there :) like most of us!
Features
- Can handle as many time zones as you like
- Very easy to add new zones
- You can reorder the time zones so that you have your favorites "on top" :) (use the "page up" / "page down" buttons for this)
- Written in plain C, which means...
- ... Not bloated (has only 7K) which means...
- ... Fast. :)
- Free (GNU General Public License applies)
Known bugs
- The main frame has a wrong title. This however will be keeped for history reasons :) (just kidding)
- Knows nothing about DST (daylight saving time). It probably never will.
TODO list
- Remove the "mishoo AT infoiasi DOT ro" thing on the main frame; this will allow us to increase the display size of the list by one element :)
- Remove the application title -- this will also allow us to increase the display size of the list by one element :)
- Alarm support (i.e. you enter at what NSB time you want the alert, although your system time is Iasi)
- Support for auto reordering of the list, in function of time or alphabetically
- Support for search (? is it needed?)
Download
Time.zip -- archive that contains the source code, the compiled application (time.prc) and a small database of time zones (WTimesDB.pdb), everything in the directory "Time".
This app has been developed using prc-tools, pilrc, guikachu. Therefore the source code should be compilable without problems if you happen to have these tools installed.
Needless to say, these tools only run under Linux systems. So if you have Windows, just install the "Time/time.prc" application which is already compiled there for you.
You can also install a database that contains more time zones (hopefully I've entered them correctly, but hear the usual disclaimer: I do not assume any responsibilities, whatsoever). This database is "Time/WTimesDB.pdb" (1K).
