timestamp.h File Reference
`#include <gwenhywfar/testframework.h>`
`#include <inttypes.h>`
`#include <time.h>`

Go to the source code of this file.

## Typedefs

typedef struct GWEN_TIMESTAMP | GWEN_TIMESTAMP

## Functions

GWENHYWFAR_API void | GWEN_Timestamp_AddSeconds (GWEN_TIMESTAMP *tstamp, int seconds)
GWENHYWFAR_API int | GWEN_Timestamp_AddTests (GWEN_TEST_MODULE *mod)
GWENHYWFAR_API int | GWEN_Timestamp_Compare (const GWEN_TIMESTAMP *tstamp1, const GWEN_TIMESTAMP *tstamp0)
GWENHYWFAR_API GWEN_TIMESTAMP * | GWEN_Timestamp_dup (const GWEN_TIMESTAMP *tstamp)
GWENHYWFAR_API void | GWEN_Timestamp_free (GWEN_TIMESTAMP *tstamp)
GWENHYWFAR_API GWEN_TIMESTAMP * | GWEN_Timestamp_fromDb (GWEN_DB_NODE *db)
GWENHYWFAR_API GWEN_TIMESTAMP * | GWEN_Timestamp_fromGmTime (time_t ti)
GWENHYWFAR_API GWEN_TIMESTAMP * | GWEN_Timestamp_fromInt64 (int64_t i)
GWENHYWFAR_API GWEN_TIMESTAMP * | GWEN_Timestamp_fromLocalTime (time_t ti)
GWENHYWFAR_API GWEN_TIMESTAMP * | GWEN_Timestamp_fromString (const char *s)
GWENHYWFAR_API GWEN_TIMESTAMP * | GWEN_Timestamp_fromStructTm (const struct tm *ltm)
GWENHYWFAR_API int | GWEN_Timestamp_GetDay (const GWEN_TIMESTAMP *tstamp)
GWENHYWFAR_API int | GWEN_Timestamp_GetHour (const GWEN_TIMESTAMP *tstamp)
GWENHYWFAR_API int | GWEN_Timestamp_GetMinute (const GWEN_TIMESTAMP *tstamp)
GWENHYWFAR_API int | GWEN_Timestamp_GetMonth (const GWEN_TIMESTAMP *tstamp)
GWENHYWFAR_API int | GWEN_Timestamp_GetSecond (const GWEN_TIMESTAMP *tstamp)
GWENHYWFAR_API const char * | GWEN_Timestamp_GetString (const GWEN_TIMESTAMP *tstamp)
GWENHYWFAR_API int | GWEN_Timestamp_GetWeekDay (const GWEN_TIMESTAMP *tstamp)
GWENHYWFAR_API int | GWEN_Timestamp_GetYear (const GWEN_TIMESTAMP *tstamp)
GWENHYWFAR_API GWEN_TIMESTAMP * | GWEN_Timestamp_new (int year, int month, int day, int hour, int minute, int second)
GWENHYWFAR_API GWEN_TIMESTAMP * | GWEN_Timestamp_NowInGmTime (void)
GWENHYWFAR_API GWEN_TIMESTAMP * | GWEN_Timestamp_NowInLocalTime (void)
GWENHYWFAR_API void | GWEN_Timestamp_SetDate (GWEN_TIMESTAMP *tstamp, int year, int month, int day)
GWENHYWFAR_API void | GWEN_Timestamp_SetDateAndTime (GWEN_TIMESTAMP *tstamp, int year, int month, int day, int hour, int minute, int second)
GWENHYWFAR_API void | GWEN_Timestamp_SetJulianDate (GWEN_TIMESTAMP *tstamp, int julian)
GWENHYWFAR_API void | GWEN_Timestamp_SetTime (GWEN_TIMESTAMP *tstamp, int hour, int minute, int second)
GWENHYWFAR_API int | GWEN_Timestamp_toDb (const GWEN_TIMESTAMP *tstamp, GWEN_DB_NODE *db)
GWENHYWFAR_API int64_t | GWEN_Timestamp_toInt64 (const GWEN_TIMESTAMP *tstamp)
GWENHYWFAR_API time_t | GWEN_Timestamp_toTimeT (const GWEN_TIMESTAMP *tstamp)

## Typedef Documentation

## GWEN_TIMESTAMP

typedef struct GWEN_TIMESTAMP GWEN_TIMESTAMP

Definition at line 36 of file timestamp.h.

## Function Documentation

## GWEN_Timestamp_AddSeconds()

GWENHYWFAR_API void GWEN_Timestamp_AddSeconds | ( | GWEN_TIMESTAMP * | tstamp,
|  | int | seconds )

References GWENHYWFAR_API.

## GWEN_Timestamp_AddTests()

GWENHYWFAR_API int GWEN_Timestamp_AddTests | ( | GWEN_TEST_MODULE * | mod | ) |

References GWENHYWFAR_API.

## GWEN_Timestamp_Compare()

GWENHYWFAR_API int GWEN_Timestamp_Compare | ( | const GWEN_TIMESTAMP * | tstamp1,
|  | const GWEN_TIMESTAMP * | tstamp0 )

References GWENHYWFAR_API.

## GWEN_Timestamp_dup()

GWENHYWFAR_API GWEN_TIMESTAMP * GWEN_Timestamp_dup | ( | const GWEN_TIMESTAMP * | tstamp | ) |

References GWENHYWFAR_API.

## GWEN_Timestamp_free()

GWENHYWFAR_API void GWEN_Timestamp_free | ( | GWEN_TIMESTAMP * | tstamp | ) |

References GWENHYWFAR_API.

## GWEN_Timestamp_fromDb()

GWENHYWFAR_API GWEN_TIMESTAMP * GWEN_Timestamp_fromDb | ( | GWEN_DB_NODE * | db | ) |

References GWENHYWFAR_API.

## GWEN_Timestamp_fromGmTime()

GWENHYWFAR_API GWEN_TIMESTAMP * GWEN_Timestamp_fromGmTime | ( | time_t | ti | ) |

References GWENHYWFAR_API.

## GWEN_Timestamp_fromInt64()

GWENHYWFAR_API GWEN_TIMESTAMP * GWEN_Timestamp_fromInt64 | ( | int64_t | i | ) |

References GWENHYWFAR_API.

## GWEN_Timestamp_fromLocalTime()

GWENHYWFAR_API GWEN_TIMESTAMP * GWEN_Timestamp_fromLocalTime | ( | time_t | ti | ) |

References GWENHYWFAR_API.

## GWEN_Timestamp_fromString()

GWENHYWFAR_API GWEN_TIMESTAMP * GWEN_Timestamp_fromString | ( | const char * | s | ) |

References GWENHYWFAR_API.

## GWEN_Timestamp_fromStructTm()

GWENHYWFAR_API GWEN_TIMESTAMP * GWEN_Timestamp_fromStructTm | ( | const struct tm * | ltm | ) |

References GWENHYWFAR_API.

## GWEN_Timestamp_GetDay()

GWENHYWFAR_API int GWEN_Timestamp_GetDay | ( | const GWEN_TIMESTAMP * | tstamp | ) |

References GWENHYWFAR_API.

## GWEN_Timestamp_GetHour()

GWENHYWFAR_API int GWEN_Timestamp_GetHour | ( | const GWEN_TIMESTAMP * | tstamp | ) |

References GWENHYWFAR_API.

## GWEN_Timestamp_GetMinute()

GWENHYWFAR_API int GWEN_Timestamp_GetMinute | ( | const GWEN_TIMESTAMP * | tstamp | ) |

References GWENHYWFAR_API.

## GWEN_Timestamp_GetMonth()

GWENHYWFAR_API int GWEN_Timestamp_GetMonth | ( | const GWEN_TIMESTAMP * | tstamp | ) |

References GWENHYWFAR_API.

## GWEN_Timestamp_GetSecond()

GWENHYWFAR_API int GWEN_Timestamp_GetSecond | ( | const GWEN_TIMESTAMP * | tstamp | ) |

References GWENHYWFAR_API.

## GWEN_Timestamp_GetString()

GWENHYWFAR_API const char * GWEN_Timestamp_GetString | ( | const GWEN_TIMESTAMP * | tstamp | ) |

References GWENHYWFAR_API.

## GWEN_Timestamp_GetWeekDay()

GWENHYWFAR_API int GWEN_Timestamp_GetWeekDay | ( | const GWEN_TIMESTAMP * | tstamp | ) |

References GWENHYWFAR_API.

## GWEN_Timestamp_GetYear()

GWENHYWFAR_API int GWEN_Timestamp_GetYear | ( | const GWEN_TIMESTAMP * | tstamp | ) |

References GWENHYWFAR_API.

## GWEN_Timestamp_new()

GWENHYWFAR_API GWEN_TIMESTAMP * GWEN_Timestamp_new | ( | int | year,
|  | int | month,
|  | int | day,
|  | int | hour,
|  | int | minute,
|  | int | second )

References GWENHYWFAR_API.

## GWEN_Timestamp_NowInGmTime()

GWENHYWFAR_API GWEN_TIMESTAMP * GWEN_Timestamp_NowInGmTime | ( | void |  | ) |

References GWENHYWFAR_API.

## GWEN_Timestamp_NowInLocalTime()

GWENHYWFAR_API GWEN_TIMESTAMP * GWEN_Timestamp_NowInLocalTime | ( | void |  | ) |

References GWENHYWFAR_API.

## GWEN_Timestamp_SetDate()

GWENHYWFAR_API void GWEN_Timestamp_SetDate | ( | GWEN_TIMESTAMP * | tstamp,
|  | int | year,
|  | int | month,
|  | int | day )

References GWENHYWFAR_API.

## GWEN_Timestamp_SetDateAndTime()

GWENHYWFAR_API void GWEN_Timestamp_SetDateAndTime | ( | GWEN_TIMESTAMP * | tstamp,
|  | int | year,
|  | int | month,
|  | int | day,
|  | int | hour,
|  | int | minute,
|  | int | second )

References GWENHYWFAR_API.

## GWEN_Timestamp_SetJulianDate()

GWENHYWFAR_API void GWEN_Timestamp_SetJulianDate | ( | GWEN_TIMESTAMP * | tstamp,
|  | int | julian )

References GWENHYWFAR_API.

## GWEN_Timestamp_SetTime()

GWENHYWFAR_API void GWEN_Timestamp_SetTime | ( | GWEN_TIMESTAMP * | tstamp,
|  | int | hour,
|  | int | minute,
|  | int | second )

References GWENHYWFAR_API.

## GWEN_Timestamp_toDb()

GWENHYWFAR_API int GWEN_Timestamp_toDb | ( | const GWEN_TIMESTAMP * | tstamp,
|  | GWEN_DB_NODE * | db )

References GWENHYWFAR_API.

## GWEN_Timestamp_toInt64()

GWENHYWFAR_API int64_t GWEN_Timestamp_toInt64 | ( | const GWEN_TIMESTAMP * | tstamp | ) |

Transform the given timestamp into a 64 bit value only to be used by GWEN_Timestamp_fromInt64(). No assumptions should be made about how this value is calculated.

References GWENHYWFAR_API.

## GWEN_Timestamp_toTimeT()

GWENHYWFAR_API time_t GWEN_Timestamp_toTimeT | ( | const GWEN_TIMESTAMP * | tstamp | ) |

References GWENHYWFAR_API.