What is the time zone used in the Google trends data? - google-docs-api

I have not been able to find an answer in the docs, and since the lowest level of aggregation is daily I cannot figure it out from the data. If I use the Google trends API (or trends.google.com), what is the time zone for the underlying data used in the aggregation? Is it UTC, my local time zone, the time zone of the country where the search was conducted?

The data is aggregated as full UTC days.
It used to be mentioned in the help center for Trends.

cet in the netherlands. Sirach for breakfast in your language

Related

Timezones abbreviations

The client wants to see windows timezones, the ones at Time column here https://support.microsoft.com/en-us/help/973627/microsoft-time-zone-index-values except with UTC instead of GMT.
And also wants to see abbreviations. But I can't find any official windows timezones abbreviation list. What I find is IANA abbreviations.
We are goin to convert windows timezones to IANA timezones to work with time.
But the question is does IANA abbreviations=Windows timezones abbreviations?
If not where can I find the list of the rule for the windows abbreviations?
A few things:
The list you pointed at is not the official list of Microsoft Windows time zones. It is a copy of a very old static list from Windows Embedded 1.1., which has long been deprecated. There presently is no actively maintained list of all Windows time zones on a Microsoft web page.
To get a list of Windows time zones, call TZUTIL /L on the command line. It will return the ID and display name of each time zone installed on the system.
If you look at the CLDR zone mapping file, you'll see that many Windows zones map to more than one IANA zone. If you simply map the Windows zone to the 001 "golden zone", you may end up picking an IANA abbreviation that doesn't apply for the user. Thus, if you take the approach you described (converting to IANA and taking the IANA abbreviation), be sure to take the country code into consideration as well when doing the mapping.
Also:
There is no official single list of time zone abbreviations anywhere, because time zone abbreviations are not standardized. Many of the abbreviations we might use in English don't necessarily apply to non-English speakers, and many time zones don't have abbreviations at all.
Even in English, many time zone abbreviations are contradictory or ambiguous.
Some examples of problematic time zone abbreviations:
Does CST mean Central Standard Time, Cuba Standard Time, or China Standard Time?
Does IST mean India Standard Time, Israel Standard Time, or Ireland Standard Time?
Should Hawaii use HST or HAST?
Should HNE (Heure Normale de l'Est) be used instead of EST (Eastern Standard Time) in Quebec, Canada since its official language is French?
What is the time zone abbreviation of Minsk, Belarus? You might think MSK, but that's offensive to some because that abbreviation is also commonly used for Moscow, Russia. Belarus has one time zone for the whole country, and they don't speak English there. IANA gives the abbreviation as simply the numeric UTC offset +03 (since mid 2011).
Because of the above problems...
There is no official list of time zone abbreviations for Windows time zones. Windows doesn't use them.
You might find some time zone abbreviations listed in CLDR data, and exposed with various libraries and APIs, but they only sparsely populated in the data set. CLDR has not been reliably collecting or maintaining time zone abbreviations.

Why does android have a US/Michigan time zone?

I noticed that android makes available a timezone for "US/Michigan". However, I can't find out what that actually is. It looks like most of Michigan is in Eastern and observes DST, and a small part of the UP is in Central and also observes DST. So why did android give them their own timezone, and why can't I find anything on the internet referencing Michigan having it's own time zone? Is this some sort of historical thing for the small number of years in the 70's that Michigan didn't observe DST?
This isn't related to Android specifically, but rather to the identifiers used by the IANA TZ Database, which you can read about in the timezone tag wiki, or on Wikipedia. Android is just one consumer of this data.
You can review the details of the time zones here, and you'll find that "US/Michigan" is an alias for "America/Detroit". This covers the parts of Michigan that are in the Eastern time zone.
You'll also find that Michigan has a second time zone, which is "America/Menominee", which covers the parts of Michigan that are in the Central time zone.
In general, you should use one of these two values rather than the "US/Michigan" alias. Also, if you don't care about historical time zone differences, then it would be acceptable to just use "America/Chicago" for Central time, and "America/New_York" for Eastern time.
The specific history of Michigan, including commentary, can be found in the source files of the TZ database itself. Specifically, it describes that Michigan didn't observe daylight saving time from 1968 to 1973, and that several counties switched from Eastern Time to Central Time in 1973. There are some other minor historical details as well.

Is AddThisEvent's timezone (zonecode) arbitrary?

I have users stored in the database and need to save a timezone to associate with the user so that I can use it to create events with AddThisEvent and to display other localized times.
Is the mapping from a timezone offset to the AddThisEvent zonecode arbitrary- or is he using some standard that I couldn't find?
The documentation in Step 2 describes the list of available values for the _zonecode.
These appear to be Microsoft Windows time zones, as mentioned in the timezone tag wiki.
However, the actual integers assigned to each "Zonecode" appear to be proprietary to AddThisEvent. It's likely that they are using TimeZoneInfo.GetSystemTimeZones in .NET, and assigning each entry to an integer.
Hopefully, they realize that this list is not necessarily fixed. Microsoft can provide updates which add entries to Windows when new time zones need to be created. For example, two new time zones are being added soon for the upcoming October 2014 Russian time zone changes. These would be added in the middle of the list, so the list would no longer be sequential. If they are just using an index value of the array returned, they'll be surprised when the changes cause everything to shift forward.
(Note - I have no special knowledge of how AddThisEvent is actually planning to handle updates. I am just speculating.)
In general - integers are not good time zone identifiers.
So what should I do then?
Map each of the proprietary entries back to the Windows time zone they belong to. Then, if necessary, map them to the standard IANA TZ identifier used by PHP, Python, Java, etc. You can use the CLDR mappings to determine an appropriate TZ identifier to use for each Windows time zone.
It's a shame you'll have to jump through so many hoops, but in the end, you'll be able to figure out the appropriate integer to use with AddThisEvent for each user.
It looks like AddThisEvent has already updated their timezone handling. However, if people are still using the older library and are running into this problem, one solution is to convert the datetime to UTC before passing it to AddThisEvent. Then you can use the _zonecode 35 (UTC). Calendar options like Google, Outlook, etc should be able to convert from UTC to the user's timezone appropriately.

Is there a database of time zone lines available for download?

I've searched and found a couple of online web services that do this, but I was wondering it there's a database in the public domain which gives a list of latitudes and longitudes for the standard time zone lines? I'd like to be able to calculate what time zone a coordinate is without using a web service. I figured that time zone boundaries are mostly static and were probably decided by some committee, so there should be a CSV or GPX or KML somewhere.
I'd like to be able to check what time zone a coordinate lies in, for example:
48.856667 2.350833 is GMT+1 or CET
This is a series of files -- timezone polygons (shapefile), which you can transform into boundaries. With work on your part.
http://efele.net/maps/tz/world/
You should note that simply knowing the TZ does not guarantee that you know anything about the current correct time or date there in terms of the local calendar. Time Ex: The Isreali Knesset (parliament) decides when Daylight time starts and ends - sometimes they have chosen a date in the past. Date Ex: The Hijri Calendar changes months based on the ability of people in Mecca to actually observe the new moon from there. Cloudy days alter the date.
Askgeo.com has a Java library under commercial license. (Scroll down their page to find information about it). They charge 2 grand up front for it though, considering the amount of work they must have put in compiling loads of vector maps, etc, I can understand they want the money.
I use their free API, but you wanted something downloadable, and I think this is one of your few bets.
I tried openstreetmap and they have the data, but it would be buried in a map of Earth, not completely useful itself. Here is one on Wikipedia though: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
I recently found this data here:
https://github.com/straup/whereonearth-timezone

Convert currencies with the exchange rate of a past date

Is there a free/cheap service, accessible through a web service or simple HTTP/XML queries, that can convert from a currency to another, but with the exchange rate of a specific date in the past?
Say I need to know how much 10 USD was in EUR on date March, 13, 2009.
So far I've only found oanda.com offering this service to developers, but they cost 200$/mo, and my budget is lower.
ECB is cool! But it works if I need to convert from EUR to something. If I need to convert from GBP to something elase I'll have to find another time series :( Isn't there a service or time series provider to convert from any currency to any other currency, for a certain date? Like OANDA actually, just cheaper :)
replying to myself, I found this:
http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html
You can download a single CSV file with all daily exchange rates from euro to anything...since 1999! Very cool.
I wanted to try out Google AppEngine anyway, so I made an app for this, using the ECB rates from 1999 onwards:
http://currencies.apps.grandtrunk.net/getrate/2009-11-15/usd/zar
gives you the value of 1 USD in ZAR on 2009-11-15. See this page for the full docs.
EDIT
I just threw in the Fed's rates, going back to 1971...
I'm not sure but try with Yahoo Finance web service for developers
http://developer.yahoo.com/
The USA government gives away some of this kind of data.
http://www.federalreserve.gov/RELEASES/H10/Hist/
www.xe.com
go to historical rates

Resources