Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-23 09:50:07

0001 /*
0002  * Copyright © 2010 Codethink Limited
0003  *
0004  * SPDX-License-Identifier: LGPL-2.1-or-later
0005  *
0006  * This library is free software; you can redistribute it and/or
0007  * modify it under the terms of the GNU Lesser General Public
0008  * License as published by the Free Software Foundation; either
0009  * version 2.1 of the License, or (at your option) any later version.
0010  *
0011  * This library is distributed in the hope that it will be useful, but
0012  * WITHOUT ANY WARRANTY; without even the implied warranty of
0013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0014  * Lesser General Public License for more details.
0015  *
0016  * You should have received a copy of the GNU Lesser General Public
0017  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
0018  *
0019  * Author: Ryan Lortie <desrt@desrt.ca>
0020  */
0021 
0022 #ifndef __G_TIME_ZONE_H__
0023 #define __G_TIME_ZONE_H__
0024 
0025 #if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
0026 #error "Only <glib.h> can be included directly."
0027 #endif
0028 
0029 #include <glib/gerror.h>
0030 #include <glib/gtypes.h>
0031 
0032 G_BEGIN_DECLS
0033 
0034 typedef struct _GTimeZone GTimeZone;
0035 
0036 /**
0037  * GTimeType:
0038  * @G_TIME_TYPE_STANDARD: the time is in local standard time
0039  * @G_TIME_TYPE_DAYLIGHT: the time is in local daylight time
0040  * @G_TIME_TYPE_UNIVERSAL: the time is in UTC
0041  *
0042  * Disambiguates a given time in two ways.
0043  *
0044  * First, specifies if the given time is in universal or local time.
0045  *
0046  * Second, if the time is in local time, specifies if it is local
0047  * standard time or local daylight time.  This is important for the case
0048  * where the same local time occurs twice (during daylight savings time
0049  * transitions, for example).
0050  */
0051 typedef enum
0052 {
0053   G_TIME_TYPE_STANDARD,
0054   G_TIME_TYPE_DAYLIGHT,
0055   G_TIME_TYPE_UNIVERSAL
0056 } GTimeType;
0057 
0058 GLIB_DEPRECATED_IN_2_68_FOR (g_time_zone_new_identifier)
0059 GTimeZone *             g_time_zone_new                                 (const gchar *identifier);
0060 GLIB_AVAILABLE_IN_2_68
0061 GTimeZone *             g_time_zone_new_identifier                      (const gchar *identifier);
0062 GLIB_AVAILABLE_IN_ALL
0063 GTimeZone *             g_time_zone_new_utc                             (void);
0064 GLIB_AVAILABLE_IN_ALL
0065 GTimeZone *             g_time_zone_new_local                           (void);
0066 GLIB_AVAILABLE_IN_2_58
0067 GTimeZone *             g_time_zone_new_offset                          (gint32       seconds);
0068 
0069 GLIB_AVAILABLE_IN_ALL
0070 GTimeZone *             g_time_zone_ref                                 (GTimeZone   *tz);
0071 GLIB_AVAILABLE_IN_ALL
0072 void                    g_time_zone_unref                               (GTimeZone   *tz);
0073 
0074 GLIB_AVAILABLE_IN_ALL
0075 gint                    g_time_zone_find_interval                       (GTimeZone   *tz,
0076                                                                          GTimeType    type,
0077                                                                          gint64       time_);
0078 
0079 GLIB_AVAILABLE_IN_ALL
0080 gint                    g_time_zone_adjust_time                         (GTimeZone   *tz,
0081                                                                          GTimeType    type,
0082                                                                          gint64      *time_);
0083 
0084 GLIB_AVAILABLE_IN_ALL
0085 const gchar *           g_time_zone_get_abbreviation                    (GTimeZone   *tz,
0086                                                                          gint         interval);
0087 GLIB_AVAILABLE_IN_ALL
0088 gint32                  g_time_zone_get_offset                          (GTimeZone   *tz,
0089                                                                          gint         interval);
0090 GLIB_AVAILABLE_IN_ALL
0091 gboolean                g_time_zone_is_dst                              (GTimeZone   *tz,
0092                                                                          gint         interval);
0093 GLIB_AVAILABLE_IN_2_58
0094 const gchar *           g_time_zone_get_identifier                      (GTimeZone   *tz);
0095 
0096 G_END_DECLS
0097 
0098 #endif /* __G_TIME_ZONE_H__ */