Namespaces | Functions

time.cc File Reference

Conversion between time_t and cenmin_t and back. More...

#include "time.h"
#include "endian.h"
#include "debug.h"
#include "platform.h"
Include dependency graph for time.cc:

Go to the source code of this file.

Namespaces

namespace  Barry
 

Project namespace, containing all related functions and classes.


Functions

const StaticTimeZone * Barry::GetStaticTimeZoneTable ()
 Returns a pointer to an array of StaticTimeZone structs.
const StaticTimeZone * Barry::GetStaticTimeZone (uint16_t Code)
 Searches the internal timezone code table for the given Code and returns a pointer to a StaticTimeZone struct found.
uint16_t Barry::GetStaticTimeZoneCode (signed short HourOffset, signed short MinOffset)
 Searches the internal timezone table for the first matching Code.
time_t Barry::DayToDate (uint16_t Day)
 This routine takes the day of the year and returns a time_t adjusted from the first of the year.
time_t Barry::Message2Time (uint16_t r_date, uint16_t r_time)
 Localize the funky math used to convert a Blackberry message timestamp into a time_t.
struct timespec * Barry::ThreadTimeout (int timeout_ms, struct timespec *spec)
 Creates a pthread_cond_timedwait() compatible timespec struct, based on a given timeout in milliseconds.
BXEXPORT int Barry::DaysInMonth (struct tm &t)
 Returns the number of days in the month, given the tm_mon and tm_year as specified in the struct tm argument.

Detailed Description

Conversion between time_t and cenmin_t and back.

time_t is the POSIX time, seconds from Jan 1, 1970 min1900_t is the minutes from Jan 1, 1900

Definition in file time.cc.