Method

GLibDateTimeadd_hours

since: 2.26

Declaration

GDateTime*
g_date_time_add_hours (
  GDateTime* datetime,
  gint hours
)

Description

Creates a copy of datetime and adds the specified number of hours. Add negative values to subtract hours.

Available since: 2.26

Parameters

hours

Type: gint

The number of hours to add.

Return value

Type: GDateTime

The newly created GDateTime which should be freed with g_date_time_unref(), or NULL.

The caller of the method takes ownership of the data, and is responsible for freeing it.
The return value can be NULL.