Home
%3CLINGO-SUB%20id%3D%22lingo-sub-391797%22%20slang%3D%22en-US%22%3ELesson%20Learned%20%2373%3A%20Azure%20Database%20for%20MySQL%20%E2%80%93%20CONVERT_TZ%20returns%20null%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-391797%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Team%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EToday%2C%20we%20have%20a%20new%20service%20request%20where%20our%20customer%20asked%20about%20the%20CONVERT_TZ%20function%20to%20convert%20time%20to%20CET%2C%20but%2C%20unfortunately%20the%20function%20always%20returns%20null.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESearching%20in%20several%20MySQL%20webs%20we%20found%20that%20it%20is%20needed%20to%20run%20a%20process%20to%20load%20the%20different%20time%20zones%20as%20are%20described%20in%20these%20URLs%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F8.0%2Fen%2Ftime-zone-upgrades.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F8.0%2Fen%2Ftime-zone-upgrades.html%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.5%2Fen%2Fmysql-tzinfo-to-sql.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.5%2Fen%2Fmysql-tzinfo-to-sql.html%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdev.mysql.com%2Fdownloads%2Ftimezones.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdev.mysql.com%2Fdownloads%2Ftimezones.html%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20you%20know%20you%20don't%20have%20access%20to%20Azure%20Database%20for%20MySQL%20instance%20but%2C%20following%20the%20article%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmysql%2Fhowto-server-parameters%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmysql%2Fhowto-server-parameters%3C%2FA%3E%20and%20see%20the%20part%20of%20%3CSTRONG%3E%E2%80%9CWorking%20with%20the%20time%20zone%20parameter%E2%80%9D%20there%3C%2FSTRONG%3E%2C%20you%20will%20have%20this%20option%20available.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEnjoy!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-391797%22%20slang%3D%22en-US%22%3E%3CP%3EHow%20to%20use%20%3CSTRONG%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3ECONVERT_TZ%20function%20in%20Azure%20Database%20for%20MySQL.%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E

Hello Team,

 

Today, we have a new service request where our customer asked about the CONVERT_TZ function to convert time to CET, but, unfortunately the function always returns null.

 

Searching in several MySQL webs we found that it is needed to run a process to load the different time zones as are described in these URLs:

 

As you know you don't have access to Azure Database for MySQL instance but, following the article https://docs.microsoft.com/en-us/azure/mysql/howto-server-parameters and see the part of “Working with the time zone parameter” there, you will have this option available.

 

Enjoy!