class_docstr: **Bases:** :class:`AxisItem <pyqtgraph.AxisItem>`
  
  An AxisItem that displays dates from unix timestamps.
  
  The display format is adjusted automatically depending on the current time
  density (seconds/point) on the axis. For more details on changing this
  behaviour, see :func:`setZoomLevelForDensity() <pyqtgraph.DateAxisItem.setZoomLevelForDensity>`.
  
  Can be added to an existing plot e.g. via 
  :func:`setAxisItems({'bottom':axis}) <pyqtgraph.PlotItem.setAxisItems>`.
class_docstr_tok: ["*","*","Bases",":","*","*",":","class",":","`","AxisItem","<","pyqtgraph.AxisItem",">","`","An","AxisItem","that","displays","dates","from","unix","timestamps",".","The","display","format","is","adjusted","automatically","depending","on","the","current","time","density","(","seconds\/point",")","on","the","axis",".","For","more","details","on","changing","this","behaviour",",","see",":","func",":","`","setZoomLevelForDensity","(",")","<","pyqtgraph.DateAxisItem.setZoomLevelForDensity",">","`",".","Can","be","added","to","an","existing","plot","e.g",".","via",":","func",":","`","setAxisItems","(","{","'bottom","'",":","axis","}",")","<","pyqtgraph.PlotItem.setAxisItems",">","`","."]
code: def tickStrings(self, values, scale, spacing):
      tickSpecs = self.zoomLevel.tickSpecs
      tickSpec = next(
          (s for s in tickSpecs if s.spacing == spacing), None
      )
      try:
          dates = [utcfromtimestamp(v - self.utcOffset) for v in values]
      except (OverflowError, ValueError, OSError):
          # should not normally happen
          return [
              "%g" % ((v - self.utcOffset) // SEC_PER_YEAR + 1970)
              for v in values
          ]
  
      formatStrings = []
      for x in dates:
          try:
              s = x.strftime(tickSpec.format)
              if "%f" in tickSpec.format:
                  # we only support ms precision
                  s = s[:-3]
              elif "%Y" in tickSpec.format:
                  s = s.lstrip("0")
              formatStrings.append(s)
          except ValueError:  # Windows can't handle dates before 1970
              formatStrings.append("")
      return formatStrings
  
imports: import sys
  import time
  from collections import OrderedDict
  from datetime import datetime, timedelta, timezone
  import numpy
  from .AxisItem import AxisItem
label_desc: Use image node_id 2 for calling the DateAxisItem obj's underlying member method code with example usage: obj.tickStrings(values, scale, spacing) and returns: formatStrings, unknown