Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-55125

web engine always returns 0 for getTimezoneOffset()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.7.1
    • 5.7.0
    • WebEngine
    • None
    • Arch Linux 64-bit

    Description

      The Date.getTimezoneOffset() function is broken in Qt WebEngine. It always returns 0, regardless of the actual time zone.

      Here is a script to demonstrate it:

      from PyQt5.Qt import (QApplication, QWebEngineView)                                                                                                                                                                                            
                                                                                                                             
      app = QApplication([])                                                                                                 
      w = QWebEngineView()                                                                                                   
      w.setHtml('<script>alert(new Date().getTimezoneOffset())</script>')                                                    
      w.show()                                                                                                               
                                                                                                                             
      app.exec_()
      

      This breaks time display on tons of websites.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              allan.jensen Allan Sandfeld Jensen
              kovidgoyal Kovid Goyal
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes