Changeset 50590 in webkit for trunk/JavaScriptCore/wtf/DateMath.h
- Timestamp:
- Nov 5, 2009, 10:26:47 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/DateMath.h
r49734 r50590 46 46 #include <string.h> 47 47 #include <wtf/Noncopyable.h> 48 #include <wtf/UnusedParam.h> 48 49 49 50 namespace WTF { 51 double getCurrentUTCTime(); 52 double getCurrentUTCTimeWithMicroseconds(); 53 void getLocalTime(const time_t*, tm*); 54 } 50 55 56 namespace JSC { 57 58 class ExecState; 51 59 struct GregorianDateTime; 52 60 53 61 void initializeDates(); 54 void msToGregorianDateTime( double, bool outputIsUTC, GregorianDateTime&);55 double gregorianDateTimeToMS( const GregorianDateTime&, double, bool inputIsUTC);56 double getUTCOffset( );62 void msToGregorianDateTime(ExecState*, double, bool outputIsUTC, GregorianDateTime&); 63 double gregorianDateTimeToMS(ExecState*, const GregorianDateTime&, double, bool inputIsUTC); 64 double getUTCOffset(ExecState*); 57 65 int equivalentYearForDST(int year); 58 double getCurrentUTCTime();59 double getCurrentUTCTimeWithMicroseconds();60 void getLocalTime(const time_t*, tm*);61 66 62 67 // Not really math related, but this is currently the only shared place to put these. 63 double parseDateFromNullTerminatedCharacters(const char* );68 double parseDateFromNullTerminatedCharacters(const char* dateString, ExecState* exec); // exec may be 0 64 69 double timeClip(double); 65 70 … … 99 104 } 100 105 101 GregorianDateTime( const tm& inTm)106 GregorianDateTime(ExecState* exec, const tm& inTm) 102 107 : second(inTm.tm_sec) 103 108 , minute(inTm.tm_min) … … 110 115 , isDST(inTm.tm_isdst) 111 116 { 117 UNUSED_PARAM(exec); 112 118 #if HAVE(TM_GMTOFF) 113 119 utcOffset = static_cast<int>(inTm.tm_gmtoff); 114 120 #else 115 utcOffset = static_cast<int>(getUTCOffset( ) / msPerSecond + (isDST ? secondsPerHour : 0));121 utcOffset = static_cast<int>(getUTCOffset(exec) / msPerSecond + (isDST ? secondsPerHour : 0)); 116 122 #endif 117 123 … … 188 194 } 189 195 190 } // namespace WTF196 } // namespace JSC 191 197 192 198 #endif // DateMath_h
Note:
See TracChangeset
for help on using the changeset viewer.