         dates = []
         for day in days
           day_date = copy_date(month_date)
-          day_date.setDate(day)
+          day_date.setUTCDate(day)
           # We can't use all of the values in @days, because they may not fall
           # within the current month.  In fact, if, e.g., our month is 28 days
           # and we're marking every third day, we don't want day 28 to show up
           # because it'll be right next to the 1st of the next month.  So we
           # make sure we have a bit of room before we include a day.
           future_date = new Date(day_date.getTime() + (typical_interval / 2))
-          if future_date.getMonth() == month_date.getMonth()
+          if future_date.getUTCMonth() == month_date.getUTCMonth()
+            console.log("  push #{month_date} / #{month_date.toUTCString()} ~ (#{month_date.getUTCDate()} -> #{day}) = #{day_date}")
             dates.push(day_date)
         return dates
 


      [widths, formats] = @formats[resol]
      format = formats[0]
      if char_width
        # If a width is provided, then we pick the most appropriate scale,
        # otherwise just use the widest format
        good_formats = []
        for i in [0...widths.length]
          if widths[i] * ticks.length < fill_ratio * char_width
            good_formats.push(@formats[i])
        if good_formats.length > 0
          format = good_formats[ticks.length-1]

      # Apply the format to the tick values

            # A label such as '000ms' should leave one zero.
            ss = '0' + ss
          labels.push(ss)
#           console.log("  #{t} -> #{new Date(t)} : #{tm} : #{s} -> #{ss}")
        else
          labels.push(s)

