I believe you need to specify the time-zone offset with a date
formatter.
I had the same 'bug'.
I 'fixed' it by using the time-zone attribute when specifying the
output format for the dates.
Here is a snip of code from a viewPanel that sucks its data from a
google spreadsheet.
Key point is the ex:formats definition in the second line.
<div id="events-viewPanel" ex:role="viewPanel"
ex:collectionID="events_collection"
ex:formats="date{time-zone:4;template:'MMM d, yyyy';
show:date}">
<div ex:role="view"
ex:viewClass="Tile"
ex:label="List view"
ex:showall="true"
ex:showHeader="false"
ex:showSummary="false"
ex:showFooter="false"
ex:showControls="false"
ex:orders=".start-date, .label"
ex:grouped="false"
ex:collectionID="events_collection">
</div>
</div>
Hope that helps.
C
On Nov 26, 2:03 pm, mleden <[email protected]> wrote:
> Hi James,
>
> Just a guess, but it might be related to the fact that your data is
> coming from a UK-based server and yet the Exhibit library is coming
> from a US-based server. Perhaps others can confirm that this setup is
> a problem. For my Exhibits, I host everything locally, i.e., I don't
> have any references to the simile-widgets.org domain. One other thing
> (probably unrelated but might be worth looking into) is that you
> appear to have duplicate references to the jQuery library with two
> different versions referenced (I see "/js/jquery-1.3.2.min.js" and
> "http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js").
>
> HTH,
> -Mark
>
> On Nov 26, 5:55 am, James Cummings <[email protected]> wrote:
>
> > Hiya,
>
> > I have a large number of dynamically generated exhibit pages which are date
> > oriented tables. They have a column called 'label' which contains a
> > YYYY-MM-DD date. The entire item in the JSON looks like:
>
> > {
> > "label":"1788-07-01",
> > "type": "Meeting",
> > "id": "d54657e25",
> > "URI": "/diary/1788-07-01.html",
> > "subtype": "Do Something",
>
> > "date": "1788-07-01",
> > "nah": "At Home",
> > "participants":["BAR01", "GOD00"],
> > "numParticipants": "2",
> > "venue":"Unknown"
>
> > },
>
> > in the JSON. This is then formatted for display as:
>
> > <td> <a ex:href-content=".URI" class="link"><span ex:content=".label"
> > ex:formats="date{template:'d MMMM yyyy'; show:date}"></span></a></td>
>
> > All seemed to be working well, but I've noticed that in formatting the date
> > Exhibit seems to subtract one day from the date! That is 1788-07-01 becomes
> > 30 June 1788. If label was say 1789-08-03 it would be displayed as 2 August
> > 1789! Clearly something is going wrong! Examples of live files
> > at:http://godwindiary.bodleian.ox.ac.uk/mmbrowser/BAR01.htmlandhttp://go...you
> > want.
>
> > This is usinghttp://api.simile-widgets.org/exhibit/2.2.0/exhibit-api.js...
> > Is there anything I could be doing which might be causing this or is it just
> > a bug in the date formating in Exhibit?
>
> > Any suggestions on a workaround?
>
> > Many thanks,
>
> > -James
--
You received this message because you are subscribed to the Google Groups
"SIMILE Widgets" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/simile-widgets?hl=en.