Subj : Re: Y2K problem To : borland.public.cpp.borlandcpp From : Neil Duffee Date : Mon Jul 14 2003 03:29 pm Raoul Kieffer wrote: > Following source: > TTime today; /* For current time. Same problem with TTime today = > TTime() */ > MessageBox(today.AsString().c_str(), "Test"); > displays the wrong time and date: > December 18, 2008 2:07:35 pm > Remark: Windows clock shows we are still in 2003. > > Following source: > TTime today(TDate(1, 9, 2003), 12, 0, 0); > MessageBox(today.AsString().c_str(), "Test"); > displays the correct time and date: > September 9, 2003 12:00:00 pm I've never worked with TTime but it seems to me that it's likely working as expected. From other postings I've seen, your first example, "TTime today;" only declares a variable but does not assign it memory nor a value. (or was that 'allocates memory but not a value') I suspect if you'd used something like, "TTime today = new TTime;" then you'd probably get today's date by default. My suggestion would be to read the help on TTime carefully specifically any examples provided. ps. if TTime is implemented in any fashion like Unix dates then the 'wrong date/time' listed seems awfully close to the clock roll-over point; Unix's own version of Y2K. Perhaps 2008/12/18 14h07 is an internal clock value of zeros. (wild speculation on my part) ----------> signature = 5 lines follows <-------------- Neil Duffee, Joe Systems Guy, U d'Ottawa, Ottawa, Ont, Canada telephone:1 613 562 5800 x4585 fax:1 613 562 5161 mailto:NDuffee at uottawa.ca http://aix1.uottawa.ca/~nduffee "How *do* you plan for something like that?" Guardian Bob, Reboot "For every action, there is an equal and opposite criticism." .