Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Additional Libraries
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.

OnTime library

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-01-2010, 10:05 AM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 918
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default OnTime library

The library provides access to system date, time and time zone offset.
It also enables to find the offset at any point by its coordinates.
There are two libraries, for desktop and device.

Methods:

New - initializes the object.

DllVersion - returns the library's version.

GetDate - returns the system date in the format “dd/mm/yyyy”.

GetTime - returns the system time in the format “hh:mm”.

SetDate (int Day, int Month, int Year) - sets the system time to the provided date.

SetTime (int Hour, int Minute, int Second) - sets the system time to the provided time.

GetOffset - returns the system's time zone offset in the format “hh:mm”.

SetOffset (int Hours,int Minutes) - sets the system's time zone offset.

FindZone (double Latitude, double Longitude) - returns the time zone offset of the point defined by its geographic coordinates (not including Daylight Saving changes).
East and North are positive, West and South are negative.
Max North coordinate is 85.3
Min South coordinate is -58.5
Longitude from -180 to + 180 .
To use this method you have to include the two time zone maps in your application's directory.
For the other methods these maps are not required.
Do not change their size as this will ruin the colors in the borders.
The returned time zone may be inaccurate near the zone border.

The attached files include help file, the two dlls, two cs files for integration during compilation and the two maps.

Edit: updated to ver 1.1 - instead of two maps there are four smaller ones, to eliminate memory exceptions due to the map size.

Edit: updated to ver 1.2 - takes into consideration the effect of daylight saving, which sometimes causes shift of one hour when updating system time.
Attached Files
File Type: zip Ontime1.2_part1.zip (211.3 KB, 64 views)
File Type: zip Ontime1.2_part2.zip (205.9 KB, 59 views)
__________________
David Erez
Ramat Hasharon, Israel

Last edited by derez : 08-30-2010 at 03:46 PM.
Reply With Quote
  #2 (permalink)  
Old 03-01-2010, 02:10 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 918
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

Updated to ver 1.1 - instead of two maps there are four smaller ones, to eliminate memory exceptions due to the map size.
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #3 (permalink)  
Old 08-30-2010, 11:56 AM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 918
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

Updated to ver 1.2 - takes into consideration the effect of daylight saving, which sometimes causes shift of one hour when updating system time.

I'll appreciate checking by users.

Thanks.
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Door library (Beta) - Special library Erel Official Updates 60 01-13-2011 12:23 PM
Merging Outlook library and Phone library Erel Official Updates 11 09-15-2010 10:22 AM
PhoneticAlgorithms Library (ex-StringComparison Library) moster67 Additional Libraries 10 11-11-2008 08:46 PM


All times are GMT. The time now is 10:13 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0