Changeset 3424 for trunk/gsdl/lib
- Timestamp:
- 2002-09-13T14:52:20+12:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/lib/gsdltimes.cpp
r1785 r3424 29 29 // Coordinated Universal Time (UTC)) 30 30 // returns "" if an error occurs 31 // !! Actually, we now return a string in localtime, as text2time returns 32 // a time in localtime (mktime assumes local timezone). - jrm21 Sep 2002 31 33 text_t time2text (time_t time) { 32 tm *tm_ptr = gmtime(&time); 34 // tm *tm_ptr = gmtime(&time); 35 tm *tm_ptr = localtime(&time); 36 33 37 if (tm_ptr == NULL) return ""; 34 38 … … 113 117 if (timetm.tm_sec < 0 || timetm.tm_sec > 59) 114 118 return (time_t) -1; 115 119 120 timetm.tm_isdst=0; 121 122 /* This is for darwin - mktime seems to use this, so don't leave it 123 uninitialised!! Maybe the same on freebsd/netbsd? 124 I read somewhere that APOLLO and AUX #define BSD but don't have this, 125 however that was dated 1995... 126 */ 127 #if defined(BSD) 128 timetm.tm_gmtoff=0; 129 #endif 130 131 // mktime assumes timetm is localtime 116 132 return mktime (&timetm); 117 133 }
Note:
See TracChangeset
for help on using the changeset viewer.