lubridate中的有效时区 [英] Valid time zones in lubridate

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

问题描述

快速的Google搜索似乎无济于事. lubridate的tz选项中的有效时区是什么?特别是,我正在寻找巴西利亚的时区.谢谢!

A quick google search seems to get me nowhere. What are valid time zones in lubridate's tz option? In particular, am looking for Brasilia's time zone. Thanks!

library(lubridate)
dts <- c("6-3-1995 12:01:01","29-3-1995 23:01:01","29-3-1995 20:01:01")
dmy_hms(dts)               # locale's tz default
dmy_hms(dts, tz = "chile") # Chilean time (has one time zone only)

推荐答案

OlsonNames()中进行搜索,该列表提供了主机系统上所有有效时区的列表.例如:

Take a search through OlsonNames() which provides a list of all the valid timezones on the host system. e.g.:

grep("Brazil",OlsonNames(),value=TRUE)

...为巴西提供了四种可能的结果.

...provides four possible results for Brazil.

这篇关于lubridate中的有效时区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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