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 mktime.

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 None, 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

Very simple parser for time stamps. Currently requires a format of ‘YYYY-MM-DDThh:mm:py:data::ss<Gsf.Timestamp.props.ss>’ and does only rudimentary range checking

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.