Re: GnomeDateEdit Widget
Malcolm Tredinnick <[email protected]> Thu, 11 Jul 2002 16:07:09 +1000
| Newsgroups | gmane.comp.gnome.lib.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jul 11, 2002 at 07:56:07AM +0200, Joachim Backes wrote: > having problems with the GnomeDateEdit widget: When creating this widget > (by gnome_date_edit_new()), then the date is set to the actual date/time > if I use (time_t)0 as the_time (first parameter). > > What I expect is January 1,1970 because time_t represents the time in > seconds since January 1, 1970 00:00:00. Sorry ... I had seen posts about this before and neglected to answer. The short version is that gnome_date_edit_new is behaving "correctly" in that it is documented that passing in a first parameter of 0 will give the current time. Of course, this might be considered unexpected behaviour, but that is the way it works currently (and it cannot change until GNOME 3). The argument in favour of the current behaviour is that it's pretty common to want to open a calendar or date up to the current moment and this way you are saved an explicit call to get the current time. Note also, that the behaviour you are seeing _is_ documented in the API documentation (I think this is true even in GNOME 1.4). Cheers, Malcolm