<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>255033</bug_id>
          
          <creation_ts>2023-04-05 08:20:29 -0700</creation_ts>
          <short_desc>Web Inspector: Console: timestamps are always wrong</short_desc>
          <delta_ts>2023-04-21 13:20:46 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>248240</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Devin Rousso">hi</reporter>
          <assigned_to name="Devin Rousso">hi</assigned_to>
          <cc>hi</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>jasmine.mok</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1946737</commentid>
    <comment_count>0</comment_count>
    <who name="Devin Rousso">hi</who>
    <bug_when>2023-04-05 08:20:29 -0700</bug_when>
    <thetext>1. log any message
2. compare to time on your computer</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1946738</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-04-05 08:20:45 -0700</bug_when>
    <thetext>&lt;rdar://problem/107660054&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1948829</commentid>
    <comment_count>2</comment_count>
    <who name="Jasmine">jasmine.mok</who>
    <bug_when>2023-04-14 11:01:01 -0700</bug_when>
    <thetext>I was able to reproduce this bug on macOS. It does not reproduce on Windows.

It looks like there&apos;s an issue with how MonotonicTime::now() is implemented for OS(DARWIN): https://github.com/WebKit/WebKit/blob/main/Source/WTF/wtf/CurrentTime.cpp#L265-L266

At 6:41 PM I output the following:
mach_absolute_time(): 2410267093664
fromMachAbsoluteTime(mach_absolute_time()): Monotonic(100427.795617 sec)
MonotonicTime::now(): Monotonic(100427.795629 sec)
Seconds(MonotonicTime::now().secondsSinceEpoch()): 100427.795569 sec

Converting 100427.795617 seconds to a timestamp yielded 19:53:47.795

When I commented out the OS(DARWIN) implementation of MonotonicTime::now() and tested again at 6:46 PM I got the correct timestamp of 18:46:54.921</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1948888</commentid>
    <comment_count>3</comment_count>
    <who name="Devin Rousso">hi</who>
    <bug_when>2023-04-14 14:58:35 -0700</bug_when>
    <thetext>very odd.  id expect more things to be broken if this is that off 🤔

im pretty sure JS `Date` uses `WallTime`.  perhaps we should be using that here too?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1949074</commentid>
    <comment_count>4</comment_count>
    <who name="Devin Rousso">hi</who>
    <bug_when>2023-04-16 19:54:23 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/12782</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1950463</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-04-21 13:20:44 -0700</bug_when>
    <thetext>Committed 263261@main (1eb0aa379232): &lt;https://commits.webkit.org/263261@main&gt;

Reviewed commits have been landed. Closing PR #12782 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>