Hello,By default the mysql database does not have the time zone information populated.
You have to populate it manually by running mysql_tzinfo_to_sql on the machine mysql is installed.For mysql on google cloud, how do I do that? Is there a way to access the box ?
CONVERT_TZ(dt, 'GMT', 'US/Eastern')
would be great. Why is this such an issue?
I you want to GROUP BY dates in timezone X, but the dates are stored in UTC.Did anyone ever solve this?
--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/cf4c26b2-b9f7-4b33-9e93-6051ebfbca0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
If you have stored the column to group as a DATETIME or TIMESTAMP type, or if you have stored as a DATE and also have the TIME in a different then it is possible - just convert to the desired timezone with CONVERT_TZ before grouping etc. If you have only stored the DATE and the date was determined in UTC then you cannot do this, as you don't have enough info to determine which day it occured in the desired timezone.Note that this question actually has nothing Cloud SQL specific - this simply applies to MySQL in general. Because the MySQL community is much larger than the Cloud SQL community you are better off asking questions like this in a general MySQL forum. I recommend Stack Overflow, where this question was already asked and answered several times.David
On Thu, Feb 11, 2016 at 11:45 PM, Jaap Taal <ja...@q42.nl> wrote:
I you want to GROUP BY dates in timezone X, but the dates are stored in UTC.Did anyone ever solve this?
--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsub...@googlegroups.com.