Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notebook checkpoint time is displayed an hour out #3396

Closed
takluyver opened this issue Jun 3, 2013 · 7 comments · Fixed by #3525
Closed

Notebook checkpoint time is displayed an hour out #3396

takluyver opened this issue Jun 3, 2013 · 7 comments · Fixed by #3525
Labels
Milestone

Comments

@takluyver
Copy link
Member

e.g. I see "Last Checkpoint: Jun 03 09:49 (autosaved: Jun 03 10:49)", having just saved it at 10:49 local time. The notification bubble when I hit save also showed 9:49 instead of 10:49.

I don't know whether it's forcing the checkpoint time to UTC, or just somehow missing daylight saving time.

@Carreau
Copy link
Member

Carreau commented Jun 3, 2013

Weird, they are all consistent here.

@takluyver
Copy link
Member Author

Just checked, and I see the same running directly from master, so it's not
something introduced by the packaging in Julian's PPA.

On 3 June 2013 13:38, Matthias Bussonnier notifications@github.com wrote:

Weird, they are all consistent here.


Reply to this email directly or view it on GitHubhttps://github.com//issues/3396#issuecomment-18838118
.

@Carreau
Copy link
Member

Carreau commented Jun 3, 2013

Running on localhost ?

@takluyver
Copy link
Member Author

Yep. And Ubuntu 13.04, in case that's relevant.

On 3 June 2013 14:09, Matthias Bussonnier notifications@github.com wrote:

Running on localhost ?


Reply to this email directly or view it on GitHubhttps://github.com//issues/3396#issuecomment-18839725
.

@minrk
Copy link
Member

minrk commented Jun 13, 2013

Interesting. Maybe the time conversion is missing daylight savings or something?

@takluyver
Copy link
Member Author

Ah, I think I've worked this out. You're both using Chrome, right?

We pass an ambiguous string to the date constructor. Trying new Date("2013-07-03T14:38:13.096503"); in each browser, Chrome appears to interpret it as UTC, and Firefox takes it as a local time. If I append 'Z' or '+0000' to the string to specify the time zone, they both get it right.

Dealing with that properly on the Python side looks awkward - even though we use utcfromtimestamp, it still creates a 'naive' object without timezone info. I'd be inclined to just hard code the Z into the format string in jsonutil, and specify that all dates serialised from the Python API are assumed to be UTC.

@minrk
Copy link
Member

minrk commented Jul 3, 2013

On the Python side, we are aiming to produce UTC every time, so that makes sense.

minrk added a commit to minrk/ipython that referenced this issue Jul 3, 2013
now Firefox won't get confused, turning utc timestamps into local times.

closes ipython#3396
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
now Firefox won't get confused, turning utc timestamps into local times.

closes ipython#3396
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants