Handle generalized dates

In the graph we can represent the
date as 2007, 2007-10, 2007-10-03, etc..technically these dates are UTC.

Unfortunately when this gets loaded into a Javascript object in the
browser, it gets converted to an absolute time (like Jan 1, 2007 at
0:00UTC, etc) and when we UTC-adjust that to whatever local timezone
you're viewing this in, it gets moved to the day before. So users "west"
of Greenwich see times adjusted down, and users "east" see it adjusted
up by a few hours.. or maybe it's the other way around.

This is probably a good lesson for any mashup writers - make sure your
local date/time representation properly handles generalized dates,
without timezone information. In the graph, all dates/times are really
meant to be UTC ultimately, but if a time isn't specified, the behavior
isn't well defined.

Search Help Center

Discussions

There are no conversations on this topic. Would you like to start one?

Start the Discussion »