burnash/gspread — Issue #18: Date Problems
Author: ac001
Created: 2012-01-06 00:36:25+00:00
State: open

I dont know quite what is going on with the API..

I have a raw spreadsheet, ie NO formatting, repeat NO formatting of cells and am throwing data in via gspread... and in the UK..

As I'm using google from domains,, ie a domain spreasheet and not a personal gmail one.. I have set the "domain" locale to UK english and lang..

These entries when typed manualy into a sheet come out corretly as
"25/12/012" = next xmas

25/12/2012 = the same
25-12-2012 = converts to 25/12/2012
2012-12-25 = converts to 25/12/2012

Now with the API all sorts of stuff happens.. my source data is mysql so format is YYYY-mm-dd
And indeed mad stuff happens, whether transmitted as dd/mm/YYYY or dd-mm-YYYYY
eg sometimes it converts 11/01/2011 into 01/11/2011
This is a BIG issue and lots of bugs somehow..

The only way I can make it work at the momment is to send
"12 December 2012" and this converts to 25/12/2012

My suspicion is that the google xml-API is somehow
converting uk dates to USA
and then "programatically updating" into UK format spredsdheet...
or something like that..

So we need to experiment a bit to get to the root of problem, and embed that in the client lib maybe..
certainly handing dates and date/time objects over without having to do the formatting would be nice..

Is there a way to get the spreasheets locale ?