如何更改 R 中的默认时区? [英] How to change the default time zone in R?

查看:34
本文介绍了如何更改 R 中的默认时区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更改 R 中的默认时区?我正在处理时间序列.我所有的时间序列都是在 UTC 时区定义的,但是如果我打印一个日期,它总是在 CET/CEST 时区完成.

How can I change the default timezone in R? I'm working with time series. All my time series are defined in UTC time zone, but if I print a date it is always done in CET/CEST time zone.

推荐答案

另一种不改变整个计算机时间的方法是使用 setenv 命令,如下所示:Sys.setenv(TZ='GMT')

Another way to do it, without changing the whole computer time is using the setenv command like this : Sys.setenv(TZ='GMT')

这篇关于如何更改 R 中的默认时区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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