OobsTimeConfig

## OobsTimeConfig OobsTimeConfig — Object that represents time configuration |

## Synopsis

                        OobsTimeConfig;
                        OobsTimeConfigClass;
    OobsObject*         oobs_time_config_get                (void);
    glong               oobs_time_config_get_unix_time      (OobsTimeConfig *config);
    void                oobs_time_config_set_unix_time      (OobsTimeConfig *config,
                                                             glong unix_time);
    void                oobs_time_config_get_time           (OobsTimeConfig *config,
                                                             gint *year,
                                                             gint *month,
                                                             gint *day,
                                                             gint *hour,
                                                             gint *minute,
                                                             gint *second);
    void                oobs_time_config_set_time           (OobsTimeConfig *config,
                                                             gint year,
                                                             gint month,
                                                             gint day,
                                                             gint hour,
                                                             gint minute,
                                                             gint second);
    void                oobs_time_config_get_utc_time       (OobsTimeConfig *config,
                                                             gint *year,
                                                             gint *month,
                                                             gint *day,
                                                             gint *hour,
                                                             gint *minute,
                                                             gint *second);
    void                oobs_time_config_set_utc_time       (OobsTimeConfig *config,
                                                             gint year,
                                                             gint month,
                                                             gint day,
                                                             gint hour,
                                                             gint minute,
                                                             gint second);
    const gchar*        oobs_time_config_get_timezone       (OobsTimeConfig *config);
    void                oobs_time_config_set_timezone       (OobsTimeConfig *config,
                                                             const gchar *timezone);

## Object Hierarchy

      GObject
       +----OobsObject
             +----OobsTimeConfig

## Properties

      "timezone"                 gchar*                : Read / Write
      "unix-time"                glong                 : Read / Write

## Description

## Details

### OobsTimeConfig

    typedef struct _OobsTimeConfig OobsTimeConfig;

### OobsTimeConfigClass

    typedef struct {
      OobsObjectClass parent_class;

      void (*_oobs_padding1) (void);
      void (*_oobs_padding2) (void);
      void (*_oobs_padding3) (void);
      void (*_oobs_padding4) (void);
    } OobsTimeConfigClass;

### oobs_time_config_get ()

    OobsObject*         oobs_time_config_get                (void);

Returns the OobsTimeConfig singleton, this object represents the date and time configuration.

Returns : | the singleton OobsTimeConfig.

### oobs_time_config_get_unix_time ()

    glong               oobs_time_config_get_unix_time      (OobsTimeConfig *config);

Returns the time, measured in seconds, since the "epoch" (1970-01-01T00:00:00Z).

`config` : | An OobsTimeConfig.
Returns : | The unix time of the system.

### oobs_time_config_set_unix_time ()

    void                oobs_time_config_set_unix_time      (OobsTimeConfig *config,
                                                             glong unix_time);

This function sets the config time to be unix_time. unix_time is measured in seconds, since the "epoch" (1970-01-01T00:00:00Z).

`config` : | An OobsTimeConfig.
`unix_time` : | new Unix time.

### oobs_time_config_get_time ()

    void                oobs_time_config_get_time           (OobsTimeConfig *config,
                                                             gint *year,
                                                             gint *month,
                                                             gint *day,
                                                             gint *hour,
                                                             gint *minute,
                                                             gint *second);

Gets the system time and date in human readable values.

`config` : | An OobsTimeConfig.
`year` : | gint pointer to store the year, or NULL.
`month` : | gint pointer to store the month, or NULL.
`day` : | gint pointer to store the day, or NULL.
`hour` : | gint pointer to store the hour, or NULL.
`minute` : | gint pointer to store the minute, or NULL.
`second` : | gint pointer to store the second, or NULL.

### oobs_time_config_set_time ()

    void                oobs_time_config_set_time           (OobsTimeConfig *config,
                                                             gint year,
                                                             gint month,
                                                             gint day,
                                                             gint hour,
                                                             gint minute,
                                                             gint second);

Sets the time and date of config to be the specified in the parameters.

`config` : | An OobsTimeConfig.
`year` : | year.
`month` : | month.
`day` : | day.
`hour` : | hour.
`minute` : | minute.
`second` : | second.

### oobs_time_config_get_utc_time ()

    void                oobs_time_config_get_utc_time       (OobsTimeConfig *config,
                                                             gint *year,
                                                             gint *month,
                                                             gint *day,
                                                             gint *hour,
                                                             gint *minute,
                                                             gint *second);

Gets the system time and date in human readable values (UTC).

`config` : | An OobsTimeConfig.
`year` : | gint pointer to store the year, or NULL.
`month` : | gint pointer to store the month, or NULL.
`day` : | gint pointer to store the day, or NULL.
`hour` : | gint pointer to store the hour, or NULL.
`minute` : | gint pointer to store the minute, or NULL.
`second` : | gint pointer to store the second, or NULL.

### oobs_time_config_set_utc_time ()

    void                oobs_time_config_set_utc_time       (OobsTimeConfig *config,
                                                             gint year,
                                                             gint month,
                                                             gint day,
                                                             gint hour,
                                                             gint minute,
                                                             gint second);

Sets the time and date of `config` to be the specified in the parameters (assuming they're in UTC).

`config` : | An OobsTimeConfig.
`year` : | year.
`month` : | month.
`day` : | day.
`hour` : | hour.
`minute` : | minute.
`second` : | second.

### oobs_time_config_get_timezone ()

    const gchar*        oobs_time_config_get_timezone       (OobsTimeConfig *config);

Returns the timezone set for config.

`config` : | An OobsTimeConfig.
Returns : | A pointer to the timezone as a string or NULL. This string must not be freed, modified or stored.

### oobs_time_config_set_timezone ()

    void                oobs_time_config_set_timezone       (OobsTimeConfig *config,
                                                             const gchar *timezone);

Sets the timezone of config to be timezone, overwriting the previous one.

`config` : | An OobsTimeConfig.
`timezone` : | A new timezone for config.

## Property Details

### The `"timezone"` property

      "timezone"                 gchar*                : Read / Write

Timezone for the computer.

Default value: NULL

### The `"unix-time"` property

      "unix-time"                glong                 : Read / Write

Current unix time for the computer.

Allowed values: >= 0

Default value: 0

## See Also

OobsNTPConfig, OobsNTPServer