Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DayLocator is returning incorrect times around daylights switch over #9018

Copy link
Copy link
Closed
@LanceJenkinZA

Description

@LanceJenkinZA
Issue body actions

Bug report

Bug summary

DayLocator returning incorrect times around daylights switch over, resulting in duplicate day labels.

Code for reproduction

import datetime

import pylab
import matplotlib.dates as mdates
import pytz

x = [datetime.datetime(2017, 3, 30), datetime.datetime(2017,4,4)]
y = [0, 1]

pylab.plot(x, y)

ax = pylab.gca()

tz = pytz.timezone("Australia/Sydney")
ax.xaxis.set_major_locator(mdates.DayLocator(tz=tz))
ax.xaxis.set_major_formatter(mdates.DateFormatter("%a", tz=tz))

pylab.show()

Actual outcome
The day labels for the day of the daylight switch over are duplicated, see figure below:

image

Expected outcome
The labels should not be duplicated.

Matplotlib version

  • Operating System: Kubuntu 17.04
  • Matplotlib Version: 2.02
  • Python Version: Python 2.7.13
  • pytz: 2017.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.