Convert a unit timestamp to a datetime/timestamp?

(Ported from memsql-public-chat Slack channel)

coradinibr [9:49 AM]
hi. Is there any way for MemSQL to convert a unit timestamp to a datetime/timestamp?

create table test_timestamp(date_updated timestamp);
insert into test_timestamp select 1473487200;

This results in NULL. I know if I convert to timestamp using from_unixtime it will work. It’s bad to use datetime because it will always use the server timezone. We are used to store UTC/GMT, the only way to achieve same funcionality - based on my research - is by changing the server TZ to GMT too.

alec [9:58 AM]
@coradinibr You could use convert_tz() for that: SingleStoreDB Cloud · SingleStore Documentation
docs.memsql.com

coradinibr [11:09 AM]
thanks @alec. In my case, as all my payloads have epochs, I’ll have to transform them during insertion in my pipeline. A little overhead that I was trying to avoid. :slightly_smiling_face: Again, thanks very much (edited)