在Google合作实验室中更改系统时间 [英] Changing the System Time in Google Colaboratory

查看:103
本文介绍了在Google合作实验室中更改系统时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将本地时间用作Google Colab中的系统时间,但我相信默认情况下它设置为UTC时间,如下所示: 当前日期格式

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?

推荐答案

此处是操作方法.对我来说,我住在亚洲/曼谷

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

现在我得到Tue Apr 30 20:12:30 +07 2019.您可以通过以下方式查看时区列表:

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

!ls -al /usr/share/zoneinfo

然后进入每个组的子目录. (或直接搜索Google)

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

这篇关于在Google合作实验室中更改系统时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆