Re: [gnome-db] query regarding GdaTimestamp
- From: "Vivien Malerba" <vmalerba gmail com>
- To: "Sumit Kumar Jain" <sumitskj_20 yahoo com>
- Cc: gnome-db-list gnome org
- Subject: Re: [gnome-db] query regarding GdaTimestamp
- Date: Mon, 22 Oct 2007 11:06:50 +0200
On 10/22/07, Sumit Kumar Jain <sumitskj_20 yahoo com> wrote:
>
> Hi,
> I have one query regarding GdaTimestamp. It is defined as
>
> typedef struct {
> gshort year;
> gushort month;
> gushort day;
> gushort hour;
> gushort minute;
> gushort second;
> gulong fraction;
> glong timezone; /* # of seconds to the east UTC */
> } GdaTimestamp;
>
> The timestamp is stored in this structure. Is the time stored GMT and the
> offset the offset of the timezone or the time is stored is current time and
> timezone is an extra information. Let me give an example to explain my
> query. Suppose the time now in India is 22/10/2007 10:14 am. Will the
> timestamp structure for this time look like
>
> GdaTimestamp ts =
> {
> 2007,
> 10,
> 22,
> 10,
> 14,
> 0,
> 0,
> 19800
> };
>
> OR
>
> GdaTimestamp ts =
> {
> 2007,
> 10,
> 22,
> 4,
> 44,
> 0,
> 0,
> 19800
> };
>
This structure strictly reflects what you have in your database, with
the conventions you have (implicitely or explicitely) defined. This
structure is just another representation to help avoid having to parse
output from each DBMS.
Regards,
Vivien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]