date entry



I don't know if this should be mainly a gnome issue, or
a glib issue, so I'll try here first (since I'm not
subscribed to a gnome group right now).

The date entry function of gnome (gnome_date_entry) only
allows setting/retreiving the date as a 'time_t' (which
is where the 2038 year problem exists).

I want to pass it a date that I get in the format 'YYYYMMDD'.
There are some date functions in glib (g_date_xxxx) that
manipulate dates, but it doesn't have any funtion to return
the value in a time_t format, or operate on a time_t value.

The gome_date_entry takes the time_t and immediately converts
it to a 'struct tm', which it then uses. To use the date I
have, it looks like I must first convert it to a 'struct tm',
which I can then convert to a 'time_t', which I can then
pass on to the gnome_date_enmtry routines, which then convert
it back into a 'struct tm'.

Shouldn't the g_date functions be able to handle the date
formats used by the gnome functions, or should the gnome
functions be modified to handle the g_date structure?

Using 'time_t' in the date entry bothers me because of the
'Y2038' problem (assets, loans, etc. are likely to involve
dates past 2038 right now).



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]