#include <ClockConverter.h>
Public Member Functions | |
| ClockConverter () | |
| virtual | ~ClockConverter () |
| void | usec2clock (const eyedblib::int64 usec, eyedblib::int16 *hour=0, eyedblib::int16 *min=0, eyedblib::int16 *sec=0, eyedblib::int16 *ms=0, eyedblib::int16 *us=0) |
| Computes the clock time from the usec time. | |
| void | clock2usec (eyedblib::int64 *usec, const eyedblib::int16 hour=0, const eyedblib::int16 min=0, const eyedblib::int16 sec=0, const eyedblib::int16 ms=0, const eyedblib::int16 us=0) |
| Computes the usec time from the clock. | |
| eyedblib::int32 | usec2day (eyedblib::int64 usec) |
| Convert an usec time into days. | |
| void | tz2clock (const eyedblib::int16 tz, eyedblib::int16 *hour, eyedblib::int16 *min) |
| Computes timezone (minute) -> (hour,minute). | |
| void | clock2tz (eyedblib::int16 *tz, const eyedblib::int16 hour, const eyedblib::int16 min) |
| Computes (hour, minute) -> timezone (minute). | |
| eyedblib::int64 | ascii2usec (const char *t) |
| Convert a string time into an usec time. | |
| char * | usec2ascii (const eyedblib::int64 usec) |
| Convert an usec time in ascii format (same as in ascii2usec). | |
| eyedblib::int16 | ascii2tz (const char *tz) |
| Convert a string into a timezone value. | |
| char * | tz2ascii (const eyedblib::int16 tz) |
| Convert a timezone value in ascii format (same as in ascii2tz). | |
| eyedblib::int64 | current_time () |
| Gets the current GMT time. | |
| eyedblib::int16 | local_timezone () |
| Gets the local timezone. | |
This is an abstract class.
Definition at line 39 of file ClockConverter.h.
| void eyedb::ClockConverter::usec2clock | ( | const eyedblib::int64 | usec, | |
| eyedblib::int16 * | hour = 0, |
|||
| eyedblib::int16 * | min = 0, |
|||
| eyedblib::int16 * | sec = 0, |
|||
| eyedblib::int16 * | ms = 0, |
|||
| eyedblib::int16 * | us = 0 | |||
| ) |
Computes the clock time from the usec time.
| usec | The elapsed microseconds since 00:00h | |
| hour | The returned hour (0->23) | |
| min | The returned minute (0->60) | |
| sec | The returned second (0->60) | |
| ms | The returned millisecond (0->999) | |
| us | The returned microsecond (0->999) |
Definition at line 83 of file ClockConverter.cc.
| void eyedb::ClockConverter::clock2usec | ( | eyedblib::int64 * | usec, | |
| const eyedblib::int16 | hour = 0, |
|||
| const eyedblib::int16 | min = 0, |
|||
| const eyedblib::int16 | sec = 0, |
|||
| const eyedblib::int16 | ms = 0, |
|||
| const eyedblib::int16 | us = 0 | |||
| ) |
Computes the usec time from the clock.
| usec | The elapsed microseconds since 00:00h | |
| hour | The hour (0->23) | |
| min | The minute (0->60) | |
| sec | The second (0->60) | |
| ms | The millisecond (0->999) | |
| us | The microsecond (0->999) |
Definition at line 120 of file ClockConverter.cc.
| eyedblib::int32 eyedb::ClockConverter::usec2day | ( | eyedblib::int64 | usec | ) |
Convert an usec time into days.
| usec | The time in microsecond |
Definition at line 132 of file ClockConverter.cc.
| eyedblib::int64 eyedb::ClockConverter::ascii2usec | ( | const char * | t | ) |
Convert a string time into an usec time.
This method is not thread-safe.
| t | The string time in the format HH:MM[:ss[,mmm[,uuu]]] |
Definition at line 165 of file ClockConverter.cc.
| char * eyedb::ClockConverter::usec2ascii | ( | const eyedblib::int64 | usec | ) |
Convert an usec time in ascii format (same as in ascii2usec).
The client must deallocate (delete) the returned string.
Definition at line 241 of file ClockConverter.cc.
| eyedblib::int16 eyedb::ClockConverter::ascii2tz | ( | const char * | tz | ) |
Convert a string into a timezone value.
This method is not thread-safe.
| tz | The string timezone in the format GMT(+|-)HH[:MM] |
Definition at line 260 of file ClockConverter.cc.
| char * eyedb::ClockConverter::tz2ascii | ( | const eyedblib::int16 | tz | ) |
Convert a timezone value in ascii format (same as in ascii2tz).
The client must deallocate (delete) the returned string.
Definition at line 328 of file ClockConverter.cc.
| eyedblib::int16 eyedb::ClockConverter::local_timezone | ( | ) |
Gets the local timezone.
Definition at line 375 of file ClockConverter.cc.
1.5.3