Ignore:
Timestamp:
Jan 27, 2010, 4:17:41 AM (15 years ago)
Author:
[email protected]
Message:

2010-01-27 Kwang Yul Seo <[email protected]>

Reviewed by Eric Seidel.

[BREWMP] Don't use time function
https://bugs.webkit.org/show_bug.cgi?id=33577

Calling time(0) in BREW devices causes a crash because time
is not properly ported in most devices. Cast currentTime() to
time_t to get the same result as time(0).

  • wtf/DateMath.cpp: (WTF::calculateUTCOffset):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/DateMath.cpp

    r53445 r53921  
    380380static int32_t calculateUTCOffset()
    381381{
     382#if PLATFORM(BREWMP)
     383    time_t localTime = static_cast<time_t>(currentTime());
     384#else
    382385    time_t localTime = time(0);
     386#endif
    383387    tm localt;
    384388    getLocalTime(&localTime, &localt);
Note: See TracChangeset for help on using the changeset viewer.