Changeset 123425 in webkit for trunk/Source/JavaScriptCore/runtime/DateConversion.cpp
- Timestamp:
- Jul 23, 2012, 10:19:55 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/DateConversion.cpp
r123376 r123425 59 59 { 60 60 snprintf(buffer, DateConversionBufferSize, "%s %s %02d %04d", 61 weekdayName[(t.weekDay + 6) % 7],62 monthName[t.month ], t.monthDay, t.year+ 1900);61 weekdayName[(t.weekDay() + 6) % 7], 62 monthName[t.month()], t.monthDay(), t.year() + 1900); 63 63 } 64 64 … … 66 66 { 67 67 snprintf(buffer, DateConversionBufferSize, "%s, %02d %s %04d", 68 weekdayName[(t.weekDay + 6) % 7],69 t.monthDay , monthName[t.month], t.year+ 1900);68 weekdayName[(t.weekDay() + 6) % 7], 69 t.monthDay(), monthName[t.month()], t.year() + 1900); 70 70 } 71 71 72 72 void formatTime(const GregorianDateTime &t, DateConversionBuffer& buffer) 73 73 { 74 int offset = abs( gmtoffset(t));74 int offset = abs(t.utcOffset()); 75 75 char timeZoneName[70]; 76 76 struct tm gtm = t; … … 79 79 if (timeZoneName[0]) { 80 80 snprintf(buffer, DateConversionBufferSize, "%02d:%02d:%02d GMT%c%02d%02d (%s)", 81 t.hour , t.minute, t.second,82 gmtoffset(t) < 0 ? '-' : '+', offset / (60*60), (offset / 60) % 60, timeZoneName);81 t.hour(), t.minute(), t.second(), 82 t.utcOffset() < 0 ? '-' : '+', offset / (60*60), (offset / 60) % 60, timeZoneName); 83 83 } else { 84 84 snprintf(buffer, DateConversionBufferSize, "%02d:%02d:%02d GMT%c%02d%02d", 85 t.hour , t.minute, t.second,86 gmtoffset(t) < 0 ? '-' : '+', offset / (60*60), (offset / 60) % 60);85 t.hour(), t.minute(), t.second(), 86 t.utcOffset() < 0 ? '-' : '+', offset / (60*60), (offset / 60) % 60); 87 87 } 88 88 } … … 90 90 void formatTimeUTC(const GregorianDateTime &t, DateConversionBuffer& buffer) 91 91 { 92 snprintf(buffer, DateConversionBufferSize, "%02d:%02d:%02d GMT", t.hour , t.minute, t.second);92 snprintf(buffer, DateConversionBufferSize, "%02d:%02d:%02d GMT", t.hour(), t.minute(), t.second()); 93 93 } 94 94
Note:
See TracChangeset
for help on using the changeset viewer.