Function

GLibset_date_time

unstable since: 2.90

Declaration [src]

static inline gboolean
g_set_date_time (
  GDateTime** date_time_pointer,
  GDateTime* new_date_time
)

Description [src]

Updates a pointer to a date-time to new_date_time and returns whether date_time_pointer was changed.

If new_date_time matches the previous date time, this function is a no-op. If new_date_time is different, its ref-count will be increased and it will be assigned to date_time_pointer. The previous date time pointed to by date_time_pointer will have its ref-count decreased.

Note two date-time objects that represent the same instant in different timezones are not considered equal.

date_time_pointer must not be NULL, but can point to a NULL value.

Available since: 2.90

This function is not directly available to language bindings.

Parameters

date_time_pointer

Type: GDateTime

A pointer to either a date-time or NULL.

The argument will be modified by the function.
The caller of the function takes ownership of the returned data, and is responsible for freeing it.
new_date_time

Type: GDateTime

A date-time to assign to date_time_pointer.

The argument can be NULL.
The data is owned by the caller of the function.

Return value

Type: gboolean

True if the value of date_time_pointer changed, false otherwise.