Changeset 386
- Timestamp:
- 1999-07-14T20:30:01+12:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/userdb.cpp
r373 r386 12 12 /* 13 13 $Log$ 14 Revision 1.2 1999/07/14 08:30:01 rjmcnab 15 fixed an error to do with the way time is dealt with on different machines. 16 It seems that there is no direct corresponding function to mktime and 17 localtime or gmtime might not get you back to where you started. 18 14 19 Revision 1.1 1999/07/13 23:22:04 rjmcnab 15 20 Initial revision. … … 23 28 24 29 // include crypt 25 #include <crypt.h> 30 //#include <crypt.h> 31 #include <unistd.h> 26 32 27 33 … … 284 290 if (info["user"] == thisuser.username) { 285 291 time_t keycreation = text2time (info["time"]); 286 if (keycreation != (time_t)-1 && difftime (time(NULL), keycreation) <= keydecay) { 292 if (keycreation != (time_t)-1 && difftime (text2time(time2text(time(NULL))), 293 keycreation) <= keydecay) { 287 294 // succeeded, update the key's time 288 295 info["time"] = time2text(time(NULL)); … … 319 326 text_t key = keydb.getfirstkey (); 320 327 infodbclass info; 321 time_t timenow = t ime(NULL);328 time_t timenow = text2time(time2text(time(NULL))); 322 329 time_t keycreation = (time_t)-1; 323 330 while (!key.empty()) {
Note:
See TracChangeset
for help on using the changeset viewer.