Loading...
Searching...
No Matches
tz1.c File Reference
`#include <grass/datetime.h>`
Include dependency graph for tz1.c:

Go to the source code of this file.

## Functions

int | datetime_check_timezone (const DateTime *dt, int minutes)
| returns 0 on success
int | datetime_get_timezone (const DateTime *dt, int *minutes)
| returns 0 on success
int | datetime_set_timezone (DateTime *dt, int minutes)
| returns 0 on success
int | datetime_unset_timezone (DateTime *dt)
| unsets timezone in 'dt' returns 0
int | datetime_is_valid_timezone (int minutes)
| Returns: 1 OK: -720 <= minutes <= 780 (720 = 12 hours; 780 = 13 hours) 0 NOT OK.

## Function Documentation

## datetime_check_timezone()

int datetime_check_timezone | ( | const DateTime * | dt,
|  | int | minutes )

returns 0 on success

Parameters

  dt |
  minutes |

Returns
  int

Definition at line 23 of file tz1.c.

References datetime_error(), datetime_is_absolute(), and datetime_is_valid_timezone().

Referenced by datetime_get_timezone(), and datetime_set_timezone().

## datetime_get_timezone()

int datetime_get_timezone | ( | const DateTime * | dt,
|  | int * | minutes )

returns 0 on success

Parameters

  dt |
  minutes |

Returns
  int

Definition at line 44 of file tz1.c.

References datetime_check_timezone().

Referenced by datetime_change_timezone(), datetime_difference(), and datetime_format().

## datetime_is_valid_timezone()

int datetime_is_valid_timezone | ( | int | minutes | ) |

Returns: 1 OK: -720 <= minutes <= 780 (720 = 12 hours; 780 = 13 hours) 0 NOT OK.

Parameters

  minutes |

Returns
  int

Definition at line 101 of file tz1.c.

Referenced by datetime_change_timezone(), and datetime_check_timezone().

## datetime_set_timezone()

int datetime_set_timezone | ( | DateTime * | dt,
|  | int | minutes )

returns 0 on success

Parameters

  dt |
  minutes |

Returns
  int

Definition at line 64 of file tz1.c.

References datetime_check_timezone().

## datetime_unset_timezone()

int datetime_unset_timezone | ( | DateTime * | dt | ) |

unsets timezone in 'dt' returns 0

Parameters

  dt |

Returns
  int

Definition at line 84 of file tz1.c.

Referenced by datetime_set_type().