gnome_date_edit questions



I am trying to use gnome_date_edit widget in a program, but I need
to be able to initialize the date to a specific date on startup.

The date I have is a string formayed in "YYYYMMDD", but the only
way to set the date in the gnome_date_entry is through a time_t
value. I can parse my date however necessary, but I cannot get a
good time_t version of the date.

1. How do I convert a date into a time_t for this widget?
   I've tried setting fields in a 'struct tm' and running it
   through mktime, attempted to use strptime with equally poor
   results.

2. Why does the gnome_date_entry use a time_t instead of
   or in addition to the date format used by glib?

3. Doesn't the time_t greatly limit the range of dates that can
   be handled to the range of 1970 to 2038 on 32bit machines,
   and 64 bit machines can't represent anything before 1970?
   I'm going to need dates before 1970, and after 2038 in a
   lot of applications (Accounting stuff).

4. Should I just create a new date widget or modify the existing
   one to use a different format to get past these limitations
   (like struct tm), and what should I call it?



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