Gsf.Timestamp

Fields

Name

Type

Access

Description

date

GLib.Date

r/w

GLib.Date in local timezone

seconds

int

r/w

int number of seconds since date.

time_zone

GLib.String

r/w

possibly blank GLib.String of the timezone

timet

int

r/w

as from GLib.DateTime.to_unix.

Methods

class

new ()

as_string ()

copy ()

equal (b)

free ()

hash ()

load_from_string (spec)

set_time (t)

to_value (value)

Details

class Gsf.Timestamp

A point in time.

classmethod new()
Return type:

Gsf.Timestamp

as_string()
Returns:

a string representation of self. When self is invalid, the representation is “<invalid>”.

Return type:

str

Produce a string representation (ISO 8601 format) of self.

copy()
Returns:

a separate copy of self.

Return type:

Gsf.Timestamp

Copies a timestamp.

equal(b)
Parameters:

b (Gsf.Timestamp) – another timestamp

Returns:

true if self and b represent the same point in time; false otherwise.

Return type:

bool

Compare timestamps self and b.

free()

Releases the memory in use for self (if any).

hash()
Return type:

int

load_from_string(spec)
Parameters:

spec (str) – The string to parse

Returns:

True on success

Return type:

int

Parser for time stamps. Requires a ISO 8601 formatted string.

New in version 1.14.24.

set_time(t)
Parameters:

t (int) –

to_value(value)
Parameters:

value (GObject.Value) – GObject.Value

Calls g_value_set_box (value, stamp);

New in version 1.14.24.