Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing the System Time in Google Colaboratory

I would like to use my local time as the System Time in Google Colab, but I believe by default it is set to UTC time as indicated here: Current Date Format

How am I able to change the system time to my local time?

like image 641
saaabotage Avatar asked Mar 04 '23 02:03

saaabotage


1 Answers

Here's how to do it. For me, I live in Asia/Bangkok

!rm /etc/localtime
!ln -s /usr/share/zoneinfo/Asia/Bangkok /etc/localtime
!date

Now I get Tue Apr 30 20:12:30 +07 2019. You can see the list of timezones by

!ls -al /usr/share/zoneinfo

And go into sub-directories for each group. (or simply search google)

like image 122
korakot Avatar answered May 09 '23 17:05

korakot